X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Ffortune%2Fsetup.php;h=1d03f0f3163093f30a6364803eb0e1ba4bbbc71d;hb=785fda95d72ef1fcd6a7e0198ff708e477e88be3;hp=8e4e93c96d60b57ed49ae92f494e16e3e94175d4;hpb=7413ef704c7998081328f00f2eb0a74411793588;p=squirrelmail.git diff --git a/plugins/fortune/setup.php b/plugins/fortune/setup.php index 8e4e93c9..1d03f0f3 100644 --- a/plugins/fortune/setup.php +++ b/plugins/fortune/setup.php @@ -1,22 +1,13 @@ \n". - "
\n". - "
\n"; - echo '
'; - if (!$exist) { - echo "$fortune_location" . _(" not found."); - } else { - echo "
" . _("Today's Fortune") . "
";
-        htmlspecialchars(system($fortune_location));
-    }
-
-    echo '
'; + include_once(SM_PATH . 'plugins/fortune/functions.php'); + return fortune_function(); } /** - * Get fortune prefs - * @access private - */ -function fortune_load() { - global $username, $data_dir, $fortune_visible; - - $fortune_visible = getPref($data_dir, $username, 'fortune_visible'); -} - -/** - * Add fortune options + * Call fortune option display function * @access private */ function fortune_options() { - global $fortune_visible; - - echo "" . html_tag('td',_("Fortunes:"),'right','','nowrap') . "\n"; - echo ' " . _("Show fortunes at top of mailbox") . "\n"; + include_once(SM_PATH . 'plugins/fortune/functions.php'); + fortune_function_options(); } /** - * Save fortune prefs + * Call fortune prefs load function * @access private */ -function fortune_save() { - global $username,$data_dir; - - if (sqgetGlobalVar('fortune_fortune_visible',$fortune_fortune_visible,SQ_POST)) { - setPref($data_dir, $username, 'fortune_visible', '1'); - } else { - setPref($data_dir, $username, 'fortune_visible', ''); - } +function fortune_load() { + include_once(SM_PATH . 'plugins/fortune/functions.php'); + fortune_function_load(); } - -?>