diff --git a/class2.php b/class2.php index d52fab841..4bc9ea476 100755 --- a/class2.php +++ b/class2.php @@ -310,7 +310,7 @@ unset($sql_info); //DEPRECATED, BC, call the method only when needed $sql2 = e107::getDb('sql2'); //TODO find & replace all $sql2 calls -$dbg->logTime('Prefs, misc tables'); + //DEPRECATED, BC, call the method only when needed, $e107->admin_log caught by __get() if(!isset($_E107['no_log'])) @@ -334,10 +334,12 @@ if(!isset($_E107['no_log'])) // /* PHP Compatabilty should *always* be on. */ +$dbg->logTime('Php compatibility handler'); e107_require_once(e_HANDLER.'php_compatibility_handler.php'); // SITEURL constant depends on the database // See https://github.com/e107inc/e107/issues/3033 for details. +$dbg->logTime('Set urlsdeferred'); $e107->set_urls_deferred(); // @@ -360,11 +362,10 @@ if(!isset($_E107['no_event'])) { $e_event = e107::getEvent(); //TODO - find & replace $e_event, $e107->e_event } -// TODO - DEPRECATED - remove + $dbg->logTime('Load Core Prefs'); -e107_require_once(e_HANDLER. 'pref_class.php'); -$sysprefs = new prefs; + // Check core preferences @@ -411,8 +412,12 @@ if(!e107::getConfig()->hasData()) } +$pref = e107::getPref(); // include pref class. +// e107_require_once(e_HANDLER. 'pref_class.php'); +// TODO - DEPRECATED - remove +$sysprefs = new prefs; //DEPRECATED, BC, call e107::getPref/findPref() instead -$pref = e107::getPref(); + if(e_ADMIN_AREA !== true && !isset($_E107['no_parser']) && !empty($pref['thumb_to_webp'])) { @@ -916,6 +921,19 @@ function systemTimeZones() { $zonelist = timezone_identifiers_list(); $timeNow = date('m/d/Y H:i', $_SERVER['REQUEST_TIME']); +/* + $zonelist = DateTimeZone::listIdentifiers( + DateTimeZone::AFRICA | + DateTimeZone::AMERICA | + DateTimeZone::ANTARCTICA | + DateTimeZone::ASIA | + DateTimeZone::ATLANTIC | + DateTimeZone::AUSTRALIA | + DateTimeZone::EUROPE | + DateTimeZone::INDIAN | + DateTimeZone::PACIFIC | + DateTimeZone::UTC + );*/ foreach($zonelist as $zone) { @@ -951,6 +969,7 @@ function systemTimeZones() function systemTimeZoneIsValid($zone = '') { $zones = systemTimeZones(); + $zoneKeys = array_keys($zones); if(in_array($zone, $zoneKeys, true)) diff --git a/e107_core/shortcodes/single/custom.php b/e107_core/shortcodes/single/custom.php index 91b7303ac..5d1f699e1 100644 --- a/e107_core/shortcodes/single/custom.php +++ b/e107_core/shortcodes/single/custom.php @@ -93,7 +93,10 @@ function custom_shortcode($parm) case 'clock': $clock_flat = true; - include_once(e_PLUGIN.'clock_menu/clock_menu.php'); + if(is_dir(e_PLUGIN.'clock_menu')) + { + include_once(e_PLUGIN.'clock_menu/clock_menu.php'); + } return ''; break; diff --git a/e107_handlers/db_debug_class.php b/e107_handlers/db_debug_class.php index a75e0f66d..bf44e24e7 100644 --- a/e107_handlers/db_debug_class.php +++ b/e107_handlers/db_debug_class.php @@ -453,12 +453,17 @@ } - private function highlight($label, $value = 0, $threshold = 0) + private function highlight($label, $value = 0, $thresholdHigh = 0) { - if($value > $threshold) + if($value > $thresholdHigh) { - return "" . $label . ""; + return "" . $label . ""; + } + + if($value == 0) + { + return "" . $label . ""; } return $label; @@ -609,7 +614,9 @@ $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['DB Time'] = number_format($tMarker['DB Time'] * 1000.0, 1); + // $tMarker['DB Time'] = number_format($tMarker['DB Time'] * 1000.0, 1); + $dbTime = number_format($tMarker['DB Time'] * 1000.0, 1); + $tMarker['DB Time'] = $this->highlight($dbTime,$dbTime, 10); $tMarker['OB Lev'] = $this->aOBMarks[$tKey]; } diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index 526be5e6a..96688c108 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -82,7 +82,7 @@ class e_plugin protected $_core_plugins = array( "_blank","admin_menu","banner","blogcalendar_menu", - "chatbox_menu", "clock_menu","comment_menu", + "chatbox_menu", "comment_menu", "contact", "download", "featurebox", "forum","gallery", "gsitemap", "hero", "import", "linkwords", "list_new", "login_menu", "newforumposts_main", "news", "newsfeed", diff --git a/e107_plugins/hero/templates/hero_template.php b/e107_plugins/hero/templates/hero_template.php index e30a31e54..2653a20d0 100644 --- a/e107_plugins/hero/templates/hero_template.php +++ b/e107_plugins/hero/templates/hero_template.php @@ -5,7 +5,7 @@ if (!defined('e107_INIT')) { exit; } -$HERO_TEMPLATE = array(); + $HERO_TEMPLATE['default']['header'] = '{SETIMAGE: w=400&h=400}