X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsent_subfolders%2Fsetup.php;h=e49d8e85cd18e20ae0badbfa249d1916887d2ae9;hp=9eb723eda211b148d2133049659584834fece6d9;hb=ae5dddc065f9501f267c4edaf68a066835da915f;hpb=e2af439f5c571be180f84e75eae742e05b4a392d diff --git a/plugins/sent_subfolders/setup.php b/plugins/sent_subfolders/setup.php index 9eb723ed..e49d8e85 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-2011 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,46 +20,28 @@ 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() { - include_once(SM_PATH . 'plugins/sent_subfolders/functions.php'); - sent_subfolders_check_handleAsSent_do(); -} - -/** - * Loads sent_subfolders settings - */ -function sent_subfolders_load_prefs() { +function sent_subfolders_check_handleAsSent($mailbox) { include_once(SM_PATH . 'plugins/sent_subfolders/functions.php'); - sent_subfolders_load_prefs_do(); + sent_subfolders_check_handleAsSent_do($mailbox); } /**