Bug fix for log file with class and missing wrapper function in DB\IO
When the class name was in a namespace the \ was added into the file name that might cause some issues. \ is replaced with - The wrapper for db_exec was missing in the DB\IO class
This commit is contained in:
@@ -213,7 +213,7 @@ if ($cms->action == 'save') {
|
|||||||
$error = move_uploaded_file($_FILES['file_up']['tmp_name'], $upload_file);
|
$error = move_uploaded_file($_FILES['file_up']['tmp_name'], $upload_file);
|
||||||
|
|
||||||
$cms->debug('file_upload', "UP: $upload_file");
|
$cms->debug('file_upload', "UP: $upload_file");
|
||||||
$cms->debug('file_upload', "Orig: ".$cms->print_ar($_FILES['file_up']));
|
$cms->debug('file_upload', "Orig: ".$cms->printAr($_FILES['file_up']));
|
||||||
|
|
||||||
// because I get bogus error info from move_uploaded_file ...
|
// because I get bogus error info from move_uploaded_file ...
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|||||||
@@ -621,10 +621,10 @@ class Basic
|
|||||||
// only write if write is requested
|
// only write if write is requested
|
||||||
if (($this->print_output[$level] || $this->print_output_all) && !$this->print_output_not[$level]) {
|
if (($this->print_output[$level] || $this->print_output_all) && !$this->print_output_not[$level]) {
|
||||||
// replace all html tags
|
// replace all html tags
|
||||||
// $error_string = preg_replace("/(<\/?)(\w+)([^>]*>)/", "##\\2##", $error_string);
|
// $error_string = preg_replace("/(<\/?)(\w+)([^>]*>)/", "##\\2##", $error_string);
|
||||||
// $error_string = preg_replace("/(<\/?)(\w+)([^>]*>)/", "", $error_string);
|
// $error_string = preg_replace("/(<\/?)(\w+)([^>]*>)/", "", $error_string);
|
||||||
// replace special line break tag
|
// replace special line break tag
|
||||||
// $error_string = str_replace('<!--#BR#-->', "\n", $error_string);
|
// $error_string = str_replace('<!--#BR#-->', "\n", $error_string);
|
||||||
|
|
||||||
// init output variable
|
// init output variable
|
||||||
$output = $error_string; // output formated error string to output file
|
$output = $error_string; // output formated error string to output file
|
||||||
@@ -654,7 +654,7 @@ class Basic
|
|||||||
$rpl_string = !$this->log_per_level ? '' : '_'.$level; // if request to write to one file
|
$rpl_string = !$this->log_per_level ? '' : '_'.$level; // if request to write to one file
|
||||||
$fn = str_replace('##LEVEL##', $rpl_string, $fn); // create output filename
|
$fn = str_replace('##LEVEL##', $rpl_string, $fn); // create output filename
|
||||||
|
|
||||||
$rpl_string = !$this->log_per_class ? '' : '_'.get_class($this); // set sub class settings
|
$rpl_string = !$this->log_per_class ? '' : '_'.str_replace('\\', '-', get_class($this)); // set sub class settings
|
||||||
$fn = str_replace('##CLASS##', $rpl_string, $fn); // create output filename
|
$fn = str_replace('##CLASS##', $rpl_string, $fn); // create output filename
|
||||||
|
|
||||||
$rpl_string = !$this->log_per_page ? '' : '_'.$this->getPageName(1); // if request to write to one file
|
$rpl_string = !$this->log_per_page ? '' : '_'.$this->getPageName(1); // if request to write to one file
|
||||||
|
|||||||
@@ -1964,6 +1964,12 @@ class IO extends \CoreLibs\Basic
|
|||||||
return $this->dbCacheReset($query);
|
return $this->dbCacheReset($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function db_exec($query = 0, $pk_name = '')
|
||||||
|
{
|
||||||
|
error_log('DEPRECATED CALL: '.__METHOD__.', '.__FILE__.':'.__LINE__.', '.debug_backtrace()[0]['file'].':'.debug_backtrace()[0]['line']);
|
||||||
|
return $this->dbExec($query, $pk_name);
|
||||||
|
}
|
||||||
|
|
||||||
public function db_exec_async($query, $pk_name = '')
|
public function db_exec_async($query, $pk_name = '')
|
||||||
{
|
{
|
||||||
error_log('DEPRECATED CALL: '.__METHOD__.', '.__FILE__.':'.__LINE__.', '.debug_backtrace()[0]['file'].':'.debug_backtrace()[0]['line']);
|
error_log('DEPRECATED CALL: '.__METHOD__.', '.__FILE__.':'.__LINE__.', '.debug_backtrace()[0]['file'].':'.debug_backtrace()[0]['line']);
|
||||||
|
|||||||
Reference in New Issue
Block a user