X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fsent_subfolders%2Fsetup.php;h=f6b3ab80b46e63e3fac289a18b3ac21dfbdbd151;hb=701e7beed3baca980039f978c6d536dd91cae775;hp=efe2db11154fd56e799a09a5672e32531687012a;hpb=32a7b3e05f69fdf4dd7edd4882cc7208987a7117;p=squirrelmail.git diff --git a/plugins/sent_subfolders/setup.php b/plugins/sent_subfolders/setup.php index efe2db11..f6b3ab80 100644 --- a/plugins/sent_subfolders/setup.php +++ b/plugins/sent_subfolders/setup.php @@ -5,21 +5,13 @@ * * This is a standard SquirrelMail 1.2 API for plugins. * - * @copyright © 1999-2007 The SquirrelMail Project Team + * @copyright 1999-2014 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins * @subpackage sent_subfolders */ -/** - */ -define('SMPREF_SENT_SUBFOLDERS_DISABLED', 0); -define('SMPREF_SENT_SUBFOLDERS_YEARLY', 1); -define('SMPREF_SENT_SUBFOLDERS_QUARTERLY', 2); -define('SMPREF_SENT_SUBFOLDERS_MONTHLY', 3); -define('SMOPT_GRP_SENT_SUBFOLDERS','SENT_SUBFOLDERS'); - /** * Adds plugin to SquirrelMail's hooks */ @@ -28,33 +20,23 @@ function squirrelmail_plugin_init_sent_subfolders() { global $squirrelmail_plugin_hooks; /* The hooks to make the sent subfolders display correctly. */ - $squirrelmail_plugin_hooks - ['check_handleAsSent_result']['sent_subfolders'] = - 'sent_subfolders_check_handleAsSent'; + $squirrelmail_plugin_hooks['check_handleAsSent_result']['sent_subfolders'] + = 'sent_subfolders_check_handleAsSent'; /* The hooks to automatically update sent subfolders. */ - $squirrelmail_plugin_hooks - ['left_main_before']['sent_subfolders'] = - 'sent_subfolders_update_sentfolder'; - - $squirrelmail_plugin_hooks - ['compose_send']['sent_subfolders'] = - 'sent_subfolders_update_sentfolder'; - - /* The hook to load the sent subfolders prefs. */ - $squirrelmail_plugin_hooks - ['loading_prefs']['sent_subfolders'] = - 'sent_subfolders_load_prefs'; +// hook isn't in 1.5.x; isn't absolutely necessary to run on the folder list anyway +// $squirrelmail_plugin_hooks['left_main_before']['sent_subfolders'] +// = 'sent_subfolders_update_sentfolder'; + $squirrelmail_plugin_hooks['compose_send']['sent_subfolders'] + = 'sent_subfolders_update_sentfolder'; /* The hooks to handle sent subfolders options. */ - $squirrelmail_plugin_hooks - ['optpage_loadhook_folder']['sent_subfolders'] = - 'sent_subfolders_optpage_loadhook_folders'; + $squirrelmail_plugin_hooks['optpage_loadhook_folder']['sent_subfolders'] + = 'sent_subfolders_optpage_loadhook_folders'; /* mark base sent folder as special mailbox */ - $squirrelmail_plugin_hooks - ['special_mailbox']['sent_subfolders'] = - 'sent_subfolders_special_mailbox'; + $squirrelmail_plugin_hooks['special_mailbox']['sent_subfolders'] + = 'sent_subfolders_special_mailbox'; } function sent_subfolders_check_handleAsSent($mailbox) { @@ -62,14 +44,6 @@ function sent_subfolders_check_handleAsSent($mailbox) { sent_subfolders_check_handleAsSent_do($mailbox); } -/** - * Loads sent_subfolders settings - */ -function sent_subfolders_load_prefs() { - include_once(SM_PATH . 'plugins/sent_subfolders/functions.php'); - sent_subfolders_load_prefs_do(); -} - /** * Adds sent_subfolders options in folder preferences */