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:
@@ -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]))
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user