X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Ffortune%2Fsetup.php;h=94f2551c6adfbf1c9e5e058e1ceb7fd67276f17c;hp=589daaf9c7b667b13357d2d64cce4c805def74a7;hb=b1870063b2e576ca9ff3cd41ada9cda1f8812507;hpb=4b4abf93a9624311afef0c385023724ee46a2b60 diff --git a/plugins/fortune/setup.php b/plugins/fortune/setup.php index 589daaf9..94f2551c 100644 --- a/plugins/fortune/setup.php +++ b/plugins/fortune/setup.php @@ -3,21 +3,13 @@ /** * Fortune plugin setup script * - * @copyright © 1999-2005 The SquirrelMail Project Team + * @copyright © 1999-2006 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins * @subpackage fortune */ -/** - * If SM_PATH isn't defined, define it. - * @ignore - */ -if (!defined('SM_PATH')) { - define('SM_PATH','../../'); -} - /** * Init plugin * @access private @@ -25,7 +17,7 @@ if (!defined('SM_PATH')) { function squirrelmail_plugin_init_fortune() { global $squirrelmail_plugin_hooks; - $squirrelmail_plugin_hooks['mailbox_index_before']['fortune'] = 'fortune'; + $squirrelmail_plugin_hooks['template_construct_message_list.tpl']['fortune'] = 'fortune'; $squirrelmail_plugin_hooks['loading_prefs']['fortune'] = 'fortune_load'; $squirrelmail_plugin_hooks['optpage_loadhook_display']['fortune'] = 'fortune_options'; } @@ -36,7 +28,7 @@ function squirrelmail_plugin_init_fortune() { */ function fortune() { include_once(SM_PATH . 'plugins/fortune/functions.php'); - fortune_function(); + return fortune_function(); } /** @@ -56,4 +48,3 @@ function fortune_load() { include_once(SM_PATH . 'plugins/fortune/functions.php'); fortune_function_load(); } -?> \ No newline at end of file