From: Michael M Slusarz Date: Fri, 12 Mar 2010 18:42:34 +0000 (-0700) Subject: More efficient way of checking script names. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8a2cff8cb1b440acc23767d300f01caa7c584d3e;p=horde.git More efficient way of checking script names. --- diff --git a/imp/templates/javascript_defs_dimp.php b/imp/templates/javascript_defs_dimp.php index ae9e6aad5..c94aa841c 100644 --- a/imp/templates/javascript_defs_dimp.php +++ b/imp/templates/javascript_defs_dimp.php @@ -8,8 +8,6 @@ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. */ -$compose_mode = (strstr($_SERVER['PHP_SELF'], 'compose-dimp.php') || strstr($_SERVER['PHP_SELF'], 'message-dimp.php')); - $app_urls = $code = $flags = array(); foreach (IMP_Dimp::menuList() as $app) { @@ -149,7 +147,7 @@ $code['text'] = array( 'vp_empty' => _("There are no messages in this mailbox."), ); -if ($compose_mode) { +if (in_array(basename($_SERVER['PHP_SELF']), array('compose-dimp.php', 'message-dimp.php'))){ $compose_cursor = $GLOBALS['prefs']->getValue('compose_cursor'); /* Variables used in compose page. */