From 2e994d27907b57caff6edc74c37297abf232df86 Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Thu, 3 Jan 2002 08:39:57 +0000 Subject: [PATCH] SoupNazi bug fixed git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2081 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/plugin.php | 17 ++++++++++++++++- plugins/squirrelspell/setup.php | 15 --------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/functions/plugin.php b/functions/plugin.php index b5f4e4f5..3ce547ca 100644 --- a/functions/plugin.php +++ b/functions/plugin.php @@ -58,4 +58,19 @@ if (isset($plugins) && is_array($plugins)) { } } -?> + /** + * This function checks whether the user's USER_AGENT is known to + * be broken. If so, returns true and the plugin is invisible to the + * offending browser. + */ + function soupNazi(){ + + global $HTTP_USER_AGENT, $SQSPELL_SOUP_NAZI; + + require_once('../plugins/squirrelspell/sqspell_config.php'); + + $soup_menu = explode( ',', $SQSPELL_SOUP_NAZI ); + return( in_array( trim( $HTTP_USER_AGENT ), $soup_menu ) ); + } + +?> \ No newline at end of file diff --git a/plugins/squirrelspell/setup.php b/plugins/squirrelspell/setup.php index cce6adfe..654b1107 100644 --- a/plugins/squirrelspell/setup.php +++ b/plugins/squirrelspell/setup.php @@ -11,21 +11,6 @@ ** $Id$ **/ - /** - * This function checks whether the user's USER_AGENT is known to - * be broken. If so, returns true and the plugin is invisible to the - * offending browser. - */ - function soupNazi(){ - - global $HTTP_USER_AGENT, $SQSPELL_SOUP_NAZI; - - require_once('../plugins/squirrelspell/sqspell_config.php'); - - $soup_menu = explode( ',', $SQSPELL_SOUP_NAZI ); - return( in_array( trim( $HTTP_USER_AGENT ), $soup_menu ) ); - } - function squirrelmail_plugin_init_squirrelspell() { /* Standard initialization API. */ global $squirrelmail_plugin_hooks; -- 2.25.1