diff --git a/class2.php b/class2.php index 6b348331f..6b2f7daf8 100755 --- a/class2.php +++ b/class2.php @@ -370,9 +370,8 @@ $dbg = e107::getDebug(); if(E107_DEBUG_LEVEL) { - // $e107_debug = true; // BC - //$dbg = e107::getDebug(); - + $dbg->active(true); + /** @deprecated $db_debug */ $db_debug = $dbg; $dbg->logTime('Init ErrHandler'); @@ -717,7 +716,7 @@ e107::getNotify()->registerEvents(); // // O: Start user session // -$sql -> db_Mark_Time('User session'); +$dbg->logTime('User session'); init_session(); // Set up a lot of the user-related constants diff --git a/e107_core/templates/footer_default.php b/e107_core/templates/footer_default.php index 2a01690df..164d43d49 100644 --- a/e107_core/templates/footer_default.php +++ b/e107_core/templates/footer_default.php @@ -71,10 +71,11 @@ if (varset($e107_popup) != 1) { $psc = array( - '' => '', - '{THEME}' => THEME_ABS, - '{---HEADER---}' => $tp->parseTemplate('{HEADER}',true), - '{---FOOTER---}' => $tp->parseTemplate('{FOOTER}',true) + '' => '', + '{THEME}' => THEME_ABS, + '{---MODAL---}' => $LAYOUT['_modal_'], + '{---HEADER---}' => $tp->parseTemplate('{HEADER}',true), + '{---FOOTER---}' => $tp->parseTemplate('{FOOTER}',true) ); parseheader($FOOTER, $psc); diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index 8a6c47290..2c731b387 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -582,6 +582,8 @@ echo "\n"; if($tmp = e_theme::loadLayout(THEME_LAYOUT)) { $LAYOUT = $tmp; + $HEADER = array(); + $FOOTER = array(); $noBody = true; unset($tmp); diff --git a/e107_handlers/db_debug_class.php b/e107_handlers/db_debug_class.php index 687eb9fb7..4c495d74e 100644 --- a/e107_handlers/db_debug_class.php +++ b/e107_handlers/db_debug_class.php @@ -25,7 +25,7 @@ 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 @@ -48,6 +48,16 @@ } + /** + * Set the active status of the debug logging. + * When set to false, called methods within the class will by bypassed for better performance. + * @param $var + */ + public function active($var) + { + $this->active = (bool) $var; + } + /** * Return a list of all registered time markers. * @return array @@ -127,7 +137,12 @@ } public function logTime($sMarker) - { // Should move to traffic_class? + { + if(!$this->active) + { + return null; + } + $timeNow = microtime(); $nMarks = ++$this->nTimeMarks; @@ -170,7 +185,10 @@ */ function Mark_Query($query, $rli, $origQryRes, $aTrace, $mytime, $curtable) { - + if(!$this->active) + { + return null; + } // global $sql; $sql = e107::getDb($rli); @@ -691,7 +709,7 @@ function logCode($type, $code, $parm, $details) { - if(!E107_DBG_BBSC) + if(!E107_DBG_BBSC || !$this->active) { return false; } @@ -910,6 +928,10 @@ */ public function log($message, $TraceLev = 1) { + if(!$this->active) + { + return null; + } if(is_array($message) || is_object($message)) { diff --git a/e107_tests/tests/unit/e107tableTest.php b/e107_tests/tests/unit/e107tableTest.php index c1dfa9f18..1abdd4329 100644 --- a/e107_tests/tests/unit/e107tableTest.php +++ b/e107_tests/tests/unit/e107tableTest.php @@ -27,7 +27,7 @@ $this->assertTrue(false, "Couldn't load e107table object"); } - $this->ns->__construct(); + $this->ns->init(); } /* diff --git a/e107_themes/bootstrap3/theme.html b/e107_themes/bootstrap3/theme.html index 42fe84326..20e5dce5d 100644 --- a/e107_themes/bootstrap3/theme.html +++ b/e107_themes/bootstrap3/theme.html @@ -1,7 +1,4 @@ - -{---MODAL---} -