X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Ffortune%2Fsetup.php;h=2782826864a2105d76cefc5a5d3721d040d9bb29;hb=7e77425503d3545d50a965e15df5f06b068c4e79;hp=89dfc68dc2809a5bf745a90c52a9099e1820e35f;hpb=47ccfad452e8d345542d09e59112cac317cffed8;p=squirrelmail.git diff --git a/plugins/fortune/setup.php b/plugins/fortune/setup.php index 89dfc68d..27828268 100644 --- a/plugins/fortune/setup.php +++ b/plugins/fortune/setup.php @@ -3,21 +3,13 @@ /** * Fortune plugin setup script * - * @copyright © 1999-2006 The SquirrelMail Project Team + * @copyright © 1999-2009 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