1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-17 12:01:05 +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

@@ -45,7 +45,7 @@ $pref['blogcal_ws'] = "monday";
$cur_year = date("Y");
$cur_month = date("n");
$cur_day = date("j");
if (strstr(e_QUERY, "year"))
if (strpos(e_QUERY, "year") !== false)
{
$tmp = explode(".", e_QUERY);
if (is_numeric($tmp[1]))

View File

@@ -45,7 +45,7 @@ if(false === $cached)
// get the requested and current date information
// ----------------------------------------------
list($cur_year, $cur_month, $cur_day) = explode(" ", date("Y n j"));
if (e_PAGE == 'news.php' && strstr(e_QUERY, "day"))
if (e_PAGE == 'news.php' && strpos(e_QUERY, "day") !== false)
{
$tmp = explode(".", e_QUERY);
// Core now support legacy queries - use just the old way
@@ -67,7 +67,7 @@ if(false === $cached)
$req_day = "";
}
}
elseif(e_PAGE == 'news.php' && strstr(e_QUERY, "month"))
elseif(e_PAGE == 'news.php' && strpos(e_QUERY, "month") !== false)
{
$tmp = explode(".", e_QUERY);
// Core now support legacy queries - use just the old way