1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-14 02:24:08 +02:00

Code speed optimization

This commit is contained in:
Cameron
2020-12-12 11:32:23 -08:00
parent d090b19c73
commit cf14705535
17 changed files with 48 additions and 45 deletions

View File

@@ -55,7 +55,7 @@ global $pref;
if(!$parm) $link = $code_text;
if($link == "external" && $extras == "")
if($link == "external" && empty($extras))
{
$link = $code_text;
$extras = "rel=external";

View File

@@ -1,12 +1,12 @@
//<?php
global $loop_uid;
if($parm == "" && is_numeric($loop_uid))
if(empty($parm) && is_numeric($loop_uid))
{
$parm = $loop_uid;
}
if(is_numeric($parm))
{
if(intval($parm) == USERID)
if((int) $parm == USERID)
{
$image = USERPHOTO;
}

View File

@@ -360,7 +360,7 @@ e107::getJs()->renderJs('footer_inline', true);
// see e107.js and class2.php
// This must be done as late as possible in page processing.
$_serverTime = time();
$lastSet = isset($_COOKIE['e107_tdSetTime']) ? intval($_COOKIE['e107_tdSetTime']) : 0;
$lastSet = isset($_COOKIE['e107_tdSetTime']) ? (int) $_COOKIE['e107_tdSetTime'] : 0;
$_serverPath = e_HTTP;
$_serverDomain = deftrue('MULTILANG_SUBDOMAIN') ? '.'.e_DOMAIN : '';
if (abs($_serverTime - $lastSet) > 120)

View File

@@ -210,7 +210,7 @@ class core_news_sef_noid_url extends eUrlConfig
else
{
if(!is_numeric($parts[1])) $id = $this->categoryIdByTitle($parts[1]);
else $id = intval($parts[1]);
else $id = (int) $parts[1];
}
if(!$id)
{