Rename old deprecated method calls
This commit is contained in:
@@ -8,5 +8,5 @@
|
|||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
// print debug messages
|
// print debug messages
|
||||||
echo $login->print_error_msg();
|
echo $login->printErrorMsg();
|
||||||
echo $cms->print_error_msg();
|
echo $cms->printErrorMsg();
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ $cms = new CoreLibs\Admin\Backend($DB_CONFIG[MAIN_DB], $lang);
|
|||||||
// the menu show flag (what menu to show)
|
// the menu show flag (what menu to show)
|
||||||
$cms->menu_show_flag = 'main';
|
$cms->menu_show_flag = 'main';
|
||||||
// db nfo
|
// db nfo
|
||||||
$cms->db_info();
|
$cms->dbInfo();
|
||||||
// set acl
|
// set acl
|
||||||
$cms->acl = $login->acl;
|
$cms->acl = $login->acl;
|
||||||
//------------------------------ class init end
|
//------------------------------ class init end
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ ob_end_flush();
|
|||||||
print "Start time: ".$base->runningTime()."<br>";
|
print "Start time: ".$base->runningTime()."<br>";
|
||||||
print "ByteStringFormat: ".$base->ByteStringFormat(1234567.12)."<br>";
|
print "ByteStringFormat: ".$base->ByteStringFormat(1234567.12)."<br>";
|
||||||
print "byteStringFormat: ".$base->byteStringFormat(1234567.12)."<br>";
|
print "byteStringFormat: ".$base->byteStringFormat(1234567.12)."<br>";
|
||||||
print "get_page_name: ".$base->get_page_name()."<br>";
|
print "get_page_name [DEPRECATED]: ".$base->get_page_name()."<br>";
|
||||||
print "getPageName: ".$base->getPageName()."<br>";
|
print "getPageName: ".$base->getPageName()."<br>";
|
||||||
|
|
||||||
print "DB Info: ".$base->dbInfo(1)."<br>";
|
print "DB Info: ".$base->dbInfo(1)."<br>";
|
||||||
@@ -31,6 +31,7 @@ print "DB Info: ".$base->dbInfo(1)."<br>";
|
|||||||
|
|
||||||
print "End Time: ".$base->runningTime()."<br>";
|
print "End Time: ".$base->runningTime()."<br>";
|
||||||
print "Run Time: ".$base->runningTime()."<br>";
|
print "Run Time: ".$base->runningTime()."<br>";
|
||||||
|
$base->resetRunningtime();
|
||||||
|
|
||||||
print "Lang: ".$base->l->__getLang().", MO File: ".$base->l->__getMoFile()."<br>";
|
print "Lang: ".$base->l->__getLang().", MO File: ".$base->l->__getMoFile()."<br>";
|
||||||
print "Translate test: Year -> ".$base->l->__('Year')."<br>";
|
print "Translate test: Year -> ".$base->l->__('Year')."<br>";
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ $lang_short = substr($lang, 0, 2);
|
|||||||
$CONTENT_INCLUDE = str_replace(".php", ".tpl", $cms->page_name);
|
$CONTENT_INCLUDE = str_replace(".php", ".tpl", $cms->page_name);
|
||||||
$FORM_NAME = !isset($FORM_NAME) || !$FORM_NAME ? str_replace(".php", "", $cms->page_name) : $FORM_NAME;
|
$FORM_NAME = !isset($FORM_NAME) || !$FORM_NAME ? str_replace(".php", "", $cms->page_name) : $FORM_NAME;
|
||||||
// set local page title
|
// set local page title
|
||||||
$L_TITLE = ucfirst(str_replace('_', ' ', $cms->get_page_name(1))).' - '.$G_TITLE;
|
$L_TITLE = ucfirst(str_replace('_', ' ', $cms->getPageName(1))).' - '.$G_TITLE;
|
||||||
// strip tpl and replace it with inc
|
// strip tpl and replace it with inc
|
||||||
// php include file per page
|
// php include file per page
|
||||||
$cms->INC_TEMPLATE_NAME = str_replace(".tpl", ".inc", $CONTENT_INCLUDE);
|
$cms->INC_TEMPLATE_NAME = str_replace(".tpl", ".inc", $CONTENT_INCLUDE);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ $cms->DATA['LANG'] = $lang;
|
|||||||
$cms->DATA['TINYMCE_LANG'] = $lang_short;
|
$cms->DATA['TINYMCE_LANG'] = $lang_short;
|
||||||
|
|
||||||
// debug data, if DEBUG flag is on, this data is print out
|
// debug data, if DEBUG flag is on, this data is print out
|
||||||
$cms->DEBUG_DATA['debug_error_msg'] = $cms->running_time();
|
$cms->DEBUG_DATA['debug_error_msg'] = $cms->runningTime();
|
||||||
$cms->DEBUG_DATA['DEBUG'] = @$DEBUG_TMPL;
|
$cms->DEBUG_DATA['DEBUG'] = @$DEBUG_TMPL;
|
||||||
|
|
||||||
// create main data array
|
// create main data array
|
||||||
|
|||||||
@@ -122,11 +122,11 @@ class Backend extends \CoreLibs\DB\IO
|
|||||||
public function adbEditLog($event = '', $data = '', $write_type = 'STRING')
|
public function adbEditLog($event = '', $data = '', $write_type = 'STRING')
|
||||||
{
|
{
|
||||||
if ($write_type == 'BINARY') {
|
if ($write_type == 'BINARY') {
|
||||||
$data_binary = $this->db_escape_bytea(bzcompress(serialize($data)));
|
$data_binary = $this->dbEscapeBytea(bzcompress(serialize($data)));
|
||||||
$data = 'see bzip compressed data_binary field';
|
$data = 'see bzip compressed data_binary field';
|
||||||
}
|
}
|
||||||
if ($write_type == 'STRING') {
|
if ($write_type == 'STRING') {
|
||||||
$data = $this->db_escape_string(serialize($data));
|
$data = $this->dbEscapeString(serialize($data));
|
||||||
}
|
}
|
||||||
|
|
||||||
$q = "INSERT INTO ".LOGIN_DB_SCHEMA.".edit_log ";
|
$q = "INSERT INTO ".LOGIN_DB_SCHEMA.".edit_log ";
|
||||||
@@ -134,18 +134,18 @@ class Backend extends \CoreLibs\DB\IO
|
|||||||
$q .= "ip, user_agent, referer, script_name, query_string, server_name, http_host, http_accept, http_accept_charset, http_accept_encoding, session_id, ";
|
$q .= "ip, user_agent, referer, script_name, query_string, server_name, http_host, http_accept, http_accept_charset, http_accept_encoding, session_id, ";
|
||||||
$q .= "action, action_id, action_yes, action_flag, action_menu, action_loaded, action_value, action_error) ";
|
$q .= "action, action_id, action_yes, action_flag, action_menu, action_loaded, action_value, action_error) ";
|
||||||
$q .= "VALUES ";
|
$q .= "VALUES ";
|
||||||
$q .= "(".@$_SESSION['EUID'].", NOW(), '".$this->db_escape_string($event)."', '".$data."', '".$data_binary."', '".$this->page_name."', ";
|
$q .= "(".@$_SESSION['EUID'].", NOW(), '".$this->dbEscapeString($event)."', '".$data."', '".$data_binary."', '".$this->page_name."', ";
|
||||||
$q .= "'".@$_SERVER["REMOTE_ADDR"]."', '".$this->db_escape_string(@$_SERVER['HTTP_USER_AGENT'])."', ";
|
$q .= "'".@$_SERVER["REMOTE_ADDR"]."', '".$this->dbEscapeString(@$_SERVER['HTTP_USER_AGENT'])."', ";
|
||||||
$q .= "'".$this->db_escape_string(@$_SERVER['HTTP_REFERER'])."', '".$this->db_escape_string(@$_SERVER['SCRIPT_FILENAME'])."', ";
|
$q .= "'".$this->dbEscapeString(@$_SERVER['HTTP_REFERER'])."', '".$this->dbEscapeString(@$_SERVER['SCRIPT_FILENAME'])."', ";
|
||||||
$q .= "'".$this->db_escape_string(@$_SERVER['QUERY_STRING'])."', '".$this->db_escape_string(@$_SERVER['SERVER_NAME'])."', ";
|
$q .= "'".$this->dbEscapeString(@$_SERVER['QUERY_STRING'])."', '".$this->dbEscapeString(@$_SERVER['SERVER_NAME'])."', ";
|
||||||
$q .= "'".$this->db_escape_string(@$_SERVER['HTTP_HOST'])."', '".$this->db_escape_string(@$_SERVER['HTTP_ACCEPT'])."', ";
|
$q .= "'".$this->dbEscapeString(@$_SERVER['HTTP_HOST'])."', '".$this->dbEscapeString(@$_SERVER['HTTP_ACCEPT'])."', ";
|
||||||
$q .= "'".$this->db_escape_string(@$_SERVER['HTTP_ACCEPT_CHARSET'])."', '".$this->db_escape_string(@$_SERVER['HTTP_ACCEPT_ENCODING'])."', ";
|
$q .= "'".$this->dbEscapeString(@$_SERVER['HTTP_ACCEPT_CHARSET'])."', '".$this->dbEscapeString(@$_SERVER['HTTP_ACCEPT_ENCODING'])."', ";
|
||||||
$q .= "'".session_id()."', ";
|
$q .= "'".session_id()."', ";
|
||||||
$q .= "'".$this->db_escape_string($this->action)."', '".$this->db_escape_string($this->action_id)."', ";
|
$q .= "'".$this->dbEscapeString($this->action)."', '".$this->dbEscapeString($this->action_id)."', ";
|
||||||
$q .= "'".$this->db_escape_string($this->action_yes)."', '".$this->db_escape_string($this->action_flag)."', ";
|
$q .= "'".$this->dbEscapeString($this->action_yes)."', '".$this->dbEscapeString($this->action_flag)."', ";
|
||||||
$q .= "'".$this->db_escape_string($this->action_menu)."', '".$this->db_escape_string($this->action_loaded)."', ";
|
$q .= "'".$this->dbEscapeString($this->action_menu)."', '".$this->dbEscapeString($this->action_loaded)."', ";
|
||||||
$q .= "'".$this->db_escape_string($this->action_value)."', '".$this->db_escape_string($this->action_error)."')";
|
$q .= "'".$this->dbEscapeString($this->action_value)."', '".$this->dbEscapeString($this->action_error)."')";
|
||||||
$this->db_exec($q, 'NULL');
|
$this->dbExec($q, 'NULL');
|
||||||
}
|
}
|
||||||
|
|
||||||
// METHOD: adbTopMenu
|
// METHOD: adbTopMenu
|
||||||
@@ -211,7 +211,7 @@ class Backend extends \CoreLibs\DB\IO
|
|||||||
$name = $pages[$i]["page_name"];
|
$name = $pages[$i]["page_name"];
|
||||||
// if page name matchs -> set selected flag
|
// if page name matchs -> set selected flag
|
||||||
$selected = 0;
|
$selected = 0;
|
||||||
if ($this->get_page_name() == $pages[$i]["filename"]) {
|
if ($this->getPageName() == $pages[$i]["filename"]) {
|
||||||
$selected = 1;
|
$selected = 1;
|
||||||
$this->page_name = $name;
|
$this->page_name = $name;
|
||||||
}
|
}
|
||||||
@@ -322,11 +322,11 @@ class Backend extends \CoreLibs\DB\IO
|
|||||||
$q = "INSERT INTO ".GLOBAL_DB_SCHEMA.".live_queue (";
|
$q = "INSERT INTO ".GLOBAL_DB_SCHEMA.".live_queue (";
|
||||||
$q .= "queue_key, key_value, key_name, type, target, data, group_key, action, associate, file";
|
$q .= "queue_key, key_value, key_name, type, target, data, group_key, action, associate, file";
|
||||||
$q .= ") VALUES (";
|
$q .= ") VALUES (";
|
||||||
$q .= "'".$this->db_escape_string($queue_key)."', '".$this->db_escape_string($key_value)."', ";
|
$q .= "'".$this->dbEscapeString($queue_key)."', '".$this->dbEscapeString($key_value)."', ";
|
||||||
$q .= "'".$this->db_escape_string($key_name)."', '".$this->db_escape_string($type)."', ";
|
$q .= "'".$this->dbEscapeString($key_name)."', '".$this->dbEscapeString($type)."', ";
|
||||||
$q .= "'".$this->db_escape_string($target)."', '".$this->db_escape_string($data)."', ";
|
$q .= "'".$this->dbEscapeString($target)."', '".$this->dbEscapeString($data)."', ";
|
||||||
$q .= "'".$this->queue_key."', '".$this->action."', '".$this->db_escape_string($associate)."', ";
|
$q .= "'".$this->queue_key."', '".$this->action."', '".$this->dbEscapeString($associate)."', ";
|
||||||
$q .= "'".$this->db_escape_string($file)."')";
|
$q .= "'".$this->dbEscapeString($file)."')";
|
||||||
$this->db_exec($q);
|
$this->db_exec($q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user