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:
@@ -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";
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user