// change page time load calculation
This commit is contained in:
+3
-1
@@ -25,7 +25,9 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
$timer_start = microtime(true);
|
||||
define('_PS_ADMIN_DIR_', getcwd());
|
||||
|
||||
require(dirname(__FILE__).'/../config/config.inc.php');
|
||||
require(dirname(__FILE__).'/functions.php');
|
||||
|
||||
@@ -38,4 +40,4 @@ if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab']))
|
||||
$_REQUEST['controller'] = strtolower($_REQUEST['tab']);
|
||||
|
||||
// Prepare and trigger admin dispatcher
|
||||
Dispatcher::getInstance()->dispatch();
|
||||
Dispatcher::getInstance()->dispatch();
|
||||
@@ -31,7 +31,7 @@
|
||||
<div id="footer">
|
||||
<div class="footerLeft">
|
||||
<a href="http://www.prestashop.com/" target="_blank">PrestaShop™ {$ps_version}</a><br />
|
||||
<span>{l s='Load time: '}{$end_time}s</span>
|
||||
<span>{l s='Load time: '}{number_format(microtime(true) - $timer_start, 3, '.', '')}s</span>
|
||||
</div>
|
||||
<div class="footerRight">
|
||||
{if $iso_is_fr}
|
||||
|
||||
@@ -249,6 +249,8 @@ class AdminControllerCore extends Controller
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
global $timer_start;
|
||||
$this->timer_start = $timer_start;
|
||||
// Has to be remove for the next Prestashop version
|
||||
global $token;
|
||||
|
||||
@@ -289,6 +291,7 @@ class AdminControllerCore extends Controller
|
||||
28 => $this->l('Zone assigned to the selection successfully'),
|
||||
29 => $this->l('Upgrade successful')
|
||||
);
|
||||
|
||||
if (!$this->identifier) $this->identifier = 'id_'.$this->table;
|
||||
if (!$this->_defaultOrderBy) $this->_defaultOrderBy = $this->identifier;
|
||||
$this->tabAccess = Profile::getProfileAccess($this->context->employee->id_profile, $this->id);
|
||||
@@ -411,8 +414,7 @@ class AdminControllerCore extends Controller
|
||||
|
||||
if ($field = $this->filterToField($key, $filter))
|
||||
{
|
||||
$type = (array_key_exists('filter_type', $field) ? $field['filter_type'] : (array_key_exists('type', $field) ? $field['type'] : false));
|
||||
if (($type == 'date' || $type == 'datetime') && is_string($value))
|
||||
$type = (array_key_exists('filter_type', $field) ? $field['filter_type'] : (array_key_exists('type', $field) ? $field['type'] : false)); if (($type == 'date' || $type == 'datetime') && is_string($value))
|
||||
$value = unserialize($value);
|
||||
$key = isset($tmp_tab[1]) ? $tmp_tab[0].'.`'.$tmp_tab[1].'`' : '`'.$tmp_tab[0].'`';
|
||||
|
||||
@@ -1369,7 +1371,7 @@ class AdminControllerCore extends Controller
|
||||
|
||||
$this->context->smarty->assign(array(
|
||||
'ps_version' => _PS_VERSION_,
|
||||
'end_time' => number_format(microtime(true) - $this->timerStart, 3, '.', ''),
|
||||
'timer_start' => $this->timer_start,
|
||||
'iso_is_fr' => strtoupper($this->context->language->iso_code) == 'FR',
|
||||
));
|
||||
}
|
||||
@@ -1588,8 +1590,6 @@ class AdminControllerCore extends Controller
|
||||
$protocol_content = (isset($useSSL) && $useSSL && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
|
||||
$this->context->link = new Link($protocol_link, $protocol_content);
|
||||
|
||||
$this->timerStart = microtime(true);
|
||||
|
||||
if (isset($_GET['logout']))
|
||||
$this->context->employee->logout();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user