From: jervfors Date: Fri, 1 Oct 2004 01:15:41 +0000 (+0000) Subject: Adding reminder X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7413ef704c7998081328f00f2eb0a74411793588;p=squirrelmail.git Adding reminder git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8107 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/plugins/fortune/setup.php b/plugins/fortune/setup.php index ce5a284e..8e4e93c9 100644 --- a/plugins/fortune/setup.php +++ b/plugins/fortune/setup.php @@ -13,24 +13,28 @@ * @version $Id$ * @package plugins * @subpackage fortune + * + * FIXME + * There should be no code in setup.php, just hook registrations. Create functions.php + * and move the code there. */ /** * Init plugin - * @access private + * @access private */ function squirrelmail_plugin_init_fortune() { global $squirrelmail_plugin_hooks; - + $squirrelmail_plugin_hooks['mailbox_index_before']['fortune'] = 'fortune'; $squirrelmail_plugin_hooks['options_display_inside']['fortune'] = 'fortune_options'; $squirrelmail_plugin_hooks['options_display_save']['fortune'] = 'fortune_save'; - $squirrelmail_plugin_hooks['loading_prefs']['fortune'] = 'fortune_load'; + $squirrelmail_plugin_hooks['loading_prefs']['fortune'] = 'fortune_load'; } /** * Show fortune - * @access private + * @access private */ function fortune() { global $fortune_visible, $color; @@ -42,22 +46,22 @@ function fortune() { $fortune_location = '/usr/games/fortune'; $exist = file_exists($fortune_location); echo "
\n". - "" . html_tag('td',_("Fortunes:"),'right','','nowrap') . "\n"; - echo '\n"; + echo "" . html_tag('td',_("Fortunes:"),'right','','nowrap') . "\n"; + echo '\n"; } /** * Save fortune prefs - * @access private + * @access private */ function fortune_save() { global $username,$data_dir; @@ -93,4 +97,4 @@ function fortune_save() { } } -?> \ No newline at end of file +?>
\n". - "
\n"; + "
\n". + "
\n"; echo '
'; if (!$exist) { echo "$fortune_location" . _(" not found."); } else { echo "
" . _("Today's Fortune") . "
";
         htmlspecialchars(system($fortune_location));
-    } 
-  
+    }
+
     echo '
'; } /** * Get fortune prefs - * @access private + * @access private */ function fortune_load() { global $username, $data_dir, $fortune_visible; @@ -67,21 +71,21 @@ function fortune_load() { /** * Add fortune options - * @access private + * @access private */ function fortune_options() { - global $fortune_visible; + global $fortune_visible; - echo "
" . _("Show fortunes at top of mailbox") . "
" . _("Show fortunes at top of mailbox") . "