1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-26 07:44:49 +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>';
}

View File

@@ -1,7 +1,7 @@
e107::includeLan(e_LANGUAGEDIR.e_LANGUAGE."/lan_user.php");
global $tp;
if (substr($parm, -5) == '-link')
if (substr($parm, -5) === '-link')
{
$parm = substr($parm, 0, -5);
return ($user_hideemail && !ADMIN) ? "<i>".LAN_143."</i>" : $tp->toHTML($parm,TRUE);

View File

@@ -28,7 +28,7 @@ $text = '';
$name_id = e107::getForm()->name2id($name);
//Get Select Box Only!
if($scaction == 'select' || $scaction == 'all')
if($scaction === 'select' || $scaction === 'all')
{
require_once(e_HANDLER."file_class.php");
$fl = new e_file;
@@ -86,7 +86,7 @@ if($scaction == 'select' || $scaction == 'all')
$text .= "</select>";
if($scaction == 'select') return $text;
if($scaction === 'select') return $text;
}
$hide = '';