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

@@ -231,17 +231,17 @@ class online_shortcodes extends e_shortcode
$pinfo = 'download.php';
$online_location_page = 'download';
}
elseif (strstr($online_location_page, 'forum'))
elseif (strpos($online_location_page, 'forum') !== false)
{
$pinfo = e_PLUGIN.'forum/forum.php';
$online_location_page = 'forum';
}
elseif (strstr($online_location_page, 'content'))
elseif (strpos($online_location_page, 'content') !== false)
{
$pinfo = 'content.php';
$online_location_page = 'content';
}
elseif (strstr($online_location_page, 'comment'))
elseif (strpos($online_location_page, 'comment') !== false)
{
$pinfo = 'comment.php';
$online_location_page = 'comment';
@@ -325,7 +325,7 @@ class online_shortcodes extends e_shortcode
$ADMIN_DIRECTORY = e107::getFolder('admin');
$pinfo = (isset($currentMember['pinfo'])) ? $currentMember['pinfo'] : '';
return !strstr($pinfo, $ADMIN_DIRECTORY) ?
return strpos($pinfo, $ADMIN_DIRECTORY) === false ?
"<a href='".$pinfo."'>".$currentMember['page']."</a>" :
$currentMember['page'];
}