diff --git a/e107_handlers/db_debug_class.php b/e107_handlers/db_debug_class.php index 568b24f70..086d64432 100644 --- a/e107_handlers/db_debug_class.php +++ b/e107_handlers/db_debug_class.php @@ -26,20 +26,20 @@ class e107_db_debug { private $active = false; // true when debug is active. - var $aSQLdetails = array(); // DB query analysis (in pieces for further analysis) - var $aDBbyTable = array(); - var $aOBMarks = array(0 => ''); // Track output buffer level at each time mark - var $aMarkNotes = array(); // Other notes can be added and output... - var $aTimeMarks = array(); // Overall time markers - var $curTimeMark = 'Start'; - var $nTimeMarks = 0; // Provide an array index for time marks. Stablizes 'current' function - var $aGoodQueries = array(); - var $aBadQueries = array(); - var $scbbcodes = array(); - var $scbcount; - var $deprecated_funcs = array(); - var $aLog = array(); // Generalized debug log (only seen during debug) - var $aIncList = array(); // Included files + public $aSQLdetails = array(); // DB query analysis (in pieces for further analysis) + public $aDBbyTable = array(); + public $aOBMarks = array(0 => ''); // Track output buffer level at each time mark + public $aMarkNotes = array(); // Other notes can be added and output... + public $aTimeMarks = array(); // Overall time markers + public $curTimeMark = 'Start'; + public $nTimeMarks = 0; // Provide an array index for time marks. Stablizes 'current' function + // public $aGoodQueries = array(); + // var $aBadQueries = array(); + public $scbbcodes = array(); + public $scbcount; + public $deprecated_funcs = array(); + public $aLog = array(); // Generalized debug log (only seen during debug) + public $aIncList = array(); // Included files function __construct() { @@ -175,14 +175,15 @@ } - /** - * @param $query - * @param $rli - * @param $origQryRes - * @param $aTrace - * @param $mytime - * @param $curtable - */ + /** + * @param $query + * @param $rli + * @param $origQryRes + * @param $aTrace + * @param $mytime + * @param $curtable + * @return null + */ function Mark_Query($query, $rli, $origQryRes, $aTrace, $mytime, $curtable) { if(!$this->active) @@ -210,7 +211,7 @@ if($sQryRes) // There's something to explain { //$nFields = mysql_num_fields($sQryRes); - $nFields = $sql->columnCount($sQryRes); // mysql_num_fields($sQryRes); + $nFields = $sql->columnCount(); // mysql_num_fields($sQryRes); $bExplained = true; } } @@ -227,7 +228,7 @@ $t['marker'] = $this->curTimeMark; $t['caller'] = "$sCallingFile($sCallingLine)"; $t['query'] = $query; - $t['ok'] = ($sQryRes !== false) ? true : false; + $t['ok'] = ($sQryRes !== false); $t['error'] = $sQryRes ? '' : $sql->getLastErrorText(); // mysql_error(); $t['nFields'] = $nFields; $t['time'] = $mytime; @@ -267,6 +268,8 @@ $this->aDBbyTable[$curtable]['DB Time'] = $mytime; $this->aDBbyTable[$curtable]['DB Count'] = 1; } + + return null; } @@ -402,6 +405,7 @@ function countLabel($amount) { + $inc = ''; if($amount < 30) { @@ -431,7 +435,7 @@ foreach($this->aTimeMarks as $item) { - $item['What'] = str_pad($item['What'], 50, " ", STR_PAD_RIGHT); + $item['What'] = str_pad($item['What'], 50); $text .= implode("\t\t\t", $item) . "\n"; } @@ -534,10 +538,10 @@ $tMem = ($tMarker['Memory']); - if($tMem < 0) // Quick Fix for negative numbers. - { + // if($tMem < 0) // Quick Fix for negative numbers. + // { // $tMem = 0.0000000001; - } + // } $tMarker['Memory'] = ($tMem ? number_format($tMem / 1024.0, 1) : '?'); // display if known @@ -578,9 +582,9 @@ $tMarker['Time'] = $this->highlight($tMarker['Time'], $thisDelta, .2); - $tMarker['%Time'] = $totTime ? number_format(100.0 * ($thisDelta / $totTime), 0) : 0; - $tMarker['%DB Count'] = number_format(100.0 * $tMarker['DB Count'] / $sql->db_QueryCount(), 0); - $tMarker['%DB Time'] = $db_time ? number_format(100.0 * $tMarker['DB Time'] / $db_time, 0) : 0; + $tMarker['%Time'] = $totTime ? number_format(100.0 * ($thisDelta / $totTime)) : 0; + $tMarker['%DB Count'] = number_format(100.0 * $tMarker['DB Count'] / $sql->db_QueryCount()); + $tMarker['%DB Time'] = $db_time ? number_format(100.0 * $tMarker['DB Time'] / $db_time) : 0; $tMarker['DB Time'] = number_format($tMarker['DB Time'] * 1000.0, 1); $tMarker['OB Lev'] = $this->aOBMarks[$tKey]; @@ -600,9 +604,9 @@ } } - $aSum['%Time'] = $totTime ? number_format(100.0 * ($aSum['Time'] / $totTime), 0) : 0; - $aSum['%DB Time'] = $db_time ? number_format(100.0 * ($aSum['DB Time'] / $db_time), 0) : 0; - $aSum['%DB Count'] = ($sql->db_QueryCount()) ? number_format(100.0 * ($aSum['DB Count'] / ($sql->db_QueryCount())), 0) : 0; + $aSum['%Time'] = $totTime ? number_format(100.0 * ($aSum['Time'] / $totTime)) : 0; + $aSum['%DB Time'] = $db_time ? number_format(100.0 * ($aSum['DB Time'] / $db_time)) : 0; + $aSum['%DB Count'] = ($sql->db_QueryCount()) ? number_format(100.0 * ($aSum['DB Count'] / ($sql->db_QueryCount()))) : 0; $aSum['Time'] = number_format($aSum['Time'] * 1000.0, 1); $aSum['DB Time'] = number_format($aSum['DB Time'] * 1000.0, 1); @@ -675,16 +679,16 @@ $aSum['DB Time'] += $curTable['DB Time']; $aSum['DB Count'] += $curTable['DB Count']; - $curTable['%DB Count'] = number_format(100.0 * $curTable['DB Count'] / $sql->db_QueryCount(), 0); - $curTable['%DB Time'] = number_format(100.0 * $curTable['DB Time'] / $db_time, 0); + $curTable['%DB Count'] = number_format(100.0 * $curTable['DB Count'] / $sql->db_QueryCount()); + $curTable['%DB Time'] = number_format(100.0 * $curTable['DB Time'] / $db_time); $timeLabel = number_format($curTable['DB Time'] * 1000.0, 1); $curTable['DB Time'] = $this->highlight($timeLabel, ($curTable['DB Time'] * 1000), 500); // 500 msec $text .= "" . implode(" ", array_values($curTable)) . " \n"; } - $aSum['%DB Time'] = $db_time ? number_format(100.0 * ($aSum['DB Time'] / $db_time), 0) : 0; - $aSum['%DB Count'] = ($sql->db_QueryCount()) ? number_format(100.0 * ($aSum['DB Count'] / ($sql->db_QueryCount())), 0) : 0; + $aSum['%DB Time'] = $db_time ? number_format(100.0 * ($aSum['DB Time'] / $db_time)) : 0; + $aSum['%DB Count'] = ($sql->db_QueryCount()) ? number_format(100.0 * ($aSum['DB Count'] / ($sql->db_QueryCount()))) : 0; $aSum['DB Time'] = number_format($aSum['DB Time'] * 1000.0, 1); $text .= "" . implode(" ", array_values($aSum)) . " \n"; $text .= "\n
\n"; @@ -892,11 +896,12 @@ } - /** - * var_dump to debug log - * - * @param mixed $message - */ + /** + * var_dump to debug log + * + * @param mixed $message + * @param int $TraceLev + */ function dump($message, $TraceLev = 1) { diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index a26fa7d35..f9c610c9d 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -281,10 +281,11 @@ class e_parse extends e_parser // CHARSET is utf-8 // if(strtolower(CHARSET) == 'utf-8') // { - if(version_compare(PHP_VERSION, '6.0.0') < 1) + + if(PHP_MAJOR_VERSION < 6) { // Need to do something here - if(extension_loaded('mbstring')) + if(extension_loaded('mbstring') && defined('MB_OVERLOAD_STRING')) { // Check for function overloading $temp = ini_get('mbstring.func_overload'); diff --git a/e107_plugins/banner/admin_banner.php b/e107_plugins/banner/admin_banner.php index 326f83340..cb39759fe 100644 --- a/e107_plugins/banner/admin_banner.php +++ b/e107_plugins/banner/admin_banner.php @@ -156,7 +156,7 @@ class banner_ui extends e_admin_ui // ------- Customize Create -------- - public function beforeCreate($new_data) + public function beforeCreate($new_data, $old_data) { // e107::getMessage()->addDebug(print_a($new_data,true)); @@ -604,6 +604,8 @@ class banner_form_ui extends e_admin_form_ui return $this->campaigns; break; } + + return null; } diff --git a/e107_plugins/clock_menu/clock.js b/e107_plugins/clock_menu/clock.js index 843114455..87031bf11 100644 --- a/e107_plugins/clock_menu/clock.js +++ b/e107_plugins/clock_menu/clock.js @@ -1,71 +1,93 @@ - \ No newline at end of file diff --git a/e107_themes/_blank/images/index.html b/e107_themes/_blank/images/index.html index 058781910..e69de29bb 100644 --- a/e107_themes/_blank/images/index.html +++ b/e107_themes/_blank/images/index.html @@ -1,47 +0,0 @@ -\n"; -echo "\n"; -echo "\n"; -echo " -".LAN_ERROR_43." - - - -\n -\n -
"; -if (is_readable(e_IMAGE.'logo.png')) -{ - echo "".LAN_ERROR_44.""; -} -echo "
"; -echo LAN_ERROR_38.'
'; -echo LAN_ERROR_39.'
'; -echo LAN_ERROR_40.'


'; -echo "
"; -echo LAN_ERROR_41.'
'; -echo "CRITICAL_ERROR:
Line {$line} {$file}
-
".LAN_ERROR_42.$message."
\n"; -echo "
\n"; - -?> diff --git a/e107_themes/_blank/index.html b/e107_themes/_blank/index.html index 058781910..e69de29bb 100644 --- a/e107_themes/_blank/index.html +++ b/e107_themes/_blank/index.html @@ -1,47 +0,0 @@ -\n"; -echo "\n"; -echo "\n"; -echo " -".LAN_ERROR_43." - - - -\n -\n -
"; -if (is_readable(e_IMAGE.'logo.png')) -{ - echo "".LAN_ERROR_44.""; -} -echo "
"; -echo LAN_ERROR_38.'
'; -echo LAN_ERROR_39.'
'; -echo LAN_ERROR_40.'


'; -echo "
"; -echo LAN_ERROR_41.'
'; -echo "CRITICAL_ERROR:
Line {$line} {$file}
-
".LAN_ERROR_42.$message."
\n"; -echo "
\n"; - -?> diff --git a/e107_web/js/chap_script.js b/e107_web/js/chap_script.js index b1e9fcc3e..24019b4ab 100644 --- a/e107_web/js/chap_script.js +++ b/e107_web/js/chap_script.js @@ -1,4 +1,4 @@ - \ No newline at end of file