1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-22 14:13:03 +02:00

Optimization

This commit is contained in:
Cameron
2017-01-29 18:43:52 -08:00
parent 46e89d103e
commit b6d9507aca
11 changed files with 84 additions and 84 deletions

View File

@@ -13,7 +13,7 @@ if(is_numeric($parm)) // Media-Manager file.
if ((e_PAGE == 'page.php') || (array_key_exists('forum_attach', $pref) && $pref['forum_attach'] && FILE_UPLOADS || ADMIN || $fromadmin))
if ((e_PAGE === 'page.php') || (array_key_exists('forum_attach', $pref) && $pref['forum_attach'] && FILE_UPLOADS || ADMIN || $fromadmin))
{
list($fname, $uc) = explode("^", $parm."^");
if($uc)

View File

@@ -45,7 +45,7 @@ global $pref;
return "<a class='bbcode' rel='external' href='javascript:window.location=\"mai\"+\"lto:\"+\"$p1\"+\"@\"+\"$p2\";self.close();' onmouseover='window.status=\"mai\"+\"lto:\"+\"$p1\"+\"@\"+\"$p2\"; return true;' onmouseout='window.status=\"\";return true;'>".$code_text."</a>";
}
if (substr($code_text,0,1) == ']')
if (substr($code_text,0,1) === ']')
{ // Special fix for E107 urls including a language (not nice, really)
$code_text = substr($code_text,1);
$parm .= ']';

View File

@@ -25,7 +25,7 @@ else
$listitems = explode("*", $code_text);
}
if ($parm == '')
if (empty($parm))
{ /* unordered list */
$listtext = "<ul class='bbcode'>";
$trailer = "</ul>";

View File

@@ -8,13 +8,13 @@ $external = ($pref['links_new_window'] || strpos($parm, 'external') === 0) ? ' r
if ($parm && $parm != 'external' && strpos($parm, ' ') === FALSE)
{
$parm = preg_replace('#^external.#is', '', $parm);
if (strtolower(substr($parm, 0, 11)) == 'javascript:')
if (strtolower(substr($parm, 0, 11)) === 'javascript:')
return '';
return '<a href="'.$tp->toAttribute($parm).'" class="bbcode '.$class.'"'.$external.'>'.$code_text.'</a>';
}
else
{
if (strtolower(substr($code_text, 0, 11)) == 'javascript:')
if (strtolower(substr($code_text, 0, 11)) === 'javascript:')
return '';
return '<a href="'.$tp->toAttribute($code_text).'" class="bbcode '.$class.'"'.$external.'>'.$code_text.'</a>';
}