1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-01 02:21:58 +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

@@ -1050,7 +1050,7 @@ class news_front
}
else // No News - empty.
{
$text .= "<div class='news-empty'><div class='alert alert-info'>".(strstr(e_QUERY, "month") ? LAN_NEWS_462 : LAN_NEWS_83)."</div></div>";
$text .= "<div class='news-empty'><div class='alert alert-info'>".(strpos(e_QUERY, "month") !== false ? LAN_NEWS_462 : LAN_NEWS_83)."</div></div>";
}
if(!empty($template['end']))
@@ -1939,7 +1939,7 @@ if(is_dir("remotefile")) {
$crem = $file -> get_files(e_BASE."remotefile", '~Readme\.txt');
if(count($crem)) {
foreach($crem as $loadrem) {
if(strstr($loadrem['fname'], "load_")) {
if(strpos($loadrem['fname'], "load_") !== false) {
require_once(e_BASE."remotefile/".$loadrem['fname']);
}
}

View File

@@ -71,7 +71,7 @@ if(false === $cached)
}
$req_year = $cur_year;
if(e_PAGE == 'news.php' && strstr(e_QUERY, "month"))
if(e_PAGE == 'news.php' && strpos(e_QUERY, "month") !== false)
{
$tmp = explode('.', e_QUERY);
$item = $tmp[1];