1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 10:04:35 +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

@@ -428,12 +428,12 @@ class CronParser
*/
function expand_ranges($str)
{
if (strstr($str, ","))
if (strpos($str, ",") !== false)
{
$arParts = explode(',', $str);
foreach ($arParts AS $part)
{
if (strstr($part, '-'))
if (strpos($part, '-') !== false)
{
$arRange = explode('-', $part);
for ($i = $arRange[0]; $i <= $arRange[1]; $i++)
@@ -447,7 +447,7 @@ class CronParser
}
}
}
elseif (strstr($str, '-'))
elseif (strpos($str, '-') !== false)
{
$arRange = explode('-', $str);
for ($i = $arRange[0]; $i <= $arRange[1]; $i++)