1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 04:10:38 +02:00

Code optimization for speed and reduced memory usage.

This commit is contained in:
Cameron
2020-12-20 11:50:10 -08:00
parent 6b5cc07929
commit 601df26d51
91 changed files with 522 additions and 482 deletions

View File

@@ -379,7 +379,7 @@ class e_db_mysql implements e_db
{
$this->dbg->log($query);
}
if ($debug !== FALSE || strstr($_SERVER['QUERY_STRING'], 'showsql'))
if ($debug !== FALSE || strpos($_SERVER['QUERY_STRING'], 'showsql') !== false)
{
$debugQry = is_array($query) ? print_a($query,true) : $query;
$queryinfo[] = "<b>{$qry_from}</b>: ".$debugQry;
@@ -1517,7 +1517,7 @@ class e_db_mysql implements e_db
foreach($this->mySQLtableList as $tab)
{
if(substr($tab,0,4) == "lan_")
if(strpos($tab, "lan_") === 0)
{
list($tmp,$lng,$tableName) = explode("_",$tab,3);
@@ -2215,13 +2215,13 @@ class e_db_mysql implements e_db
foreach($this->mySQLtableList as $tab)
{
if(substr($tab,0,4)!='lan_')
if(strpos($tab,'lan_') === 0)
{
$nolan[] = $tab;
$lan[] = $tab;
}
else
{
$lan[] = $tab;
$nolan[] = $tab;
}
}