A start for a new change_password master plugin. This is not finished
[squirrelmail.git] / plugins / sent_subfolders / setup.php
index 882b9d784222de67b7732d08370478348006da76..c60abbdfc5541c49b4a2010085fe138e4163aa33 100644 (file)
@@ -3,14 +3,19 @@
 /**
  * setup.php -- Sent Subfolders Setup File
  *
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * This is a standard Squirrelmail-1.2 API for plugins.
  *
  * $Id$
+ * @package plugins
+ * @subpackage sent_subfolders
  */
 
+/** 
+ * 
+ */
 define('SMPREF_SENT_SUBFOLDERS_DISABLED',  0);
 define('SMPREF_SENT_SUBFOLDERS_YEARLY',    1);
 define('SMPREF_SENT_SUBFOLDERS_QUARTERLY', 2);
@@ -48,9 +53,11 @@ function squirrelmail_plugin_init_sent_subfolders() {
 
 function sent_subfolders_check_handleAsSent() {
     global $handleAsSent_result, $sent_subfolders_base,
-           $use_sent_subfolders, $delimiter;
+           $use_sent_subfolders;
+
     $sent_subfolders_base = 'INBOX.Sent';
     $args = func_get_arg(0);
+    sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
 
     /* Only check the folder string if we have been passed a mailbox. */
     if ($use_sent_subfolders && (count($args) > 1)) {
@@ -82,7 +89,10 @@ function sent_subfolders_load_prefs() {
 }
 
 function sent_subfolders_optpage_loadhook_folders() {
-    global $optpage_data, $username, $key, $imapServerAddress, $imapPort;
+    global $optpage_data, $imapServerAddress, $imapPort;
+
+    sqgetGlobalVar('username', $username, SQ_SESSION);
+    sqgetGlobalVar('key', $key, SQ_COOKIE);
 
     /* Get some imap data we need later. */
     $imapConnection =
@@ -144,11 +154,15 @@ function save_option_sent_subfolders_setting($option) {
 }
 
 function sent_subfolders_update_sentfolder() {
-    global $sent_folder, $delimiter, $auto_create_special, $auto_create_done;
+    global $sent_folder, $auto_create_special, $auto_create_done;
     global $sent_subfolders_base, $sent_subfolders_setting;
-    global $username, $data_dir, $key, $imapServerAddress, $imapPort;
+    global $data_dir, $imapServerAddress, $imapPort;
     global $use_sent_subfolders, $move_to_sent, $imap_server_type;
 
+    sqgetGlobalVar('username', $username, SQ_SESSION);
+    sqgetGlobalVar('key', $key, SQ_COOKIE);
+    sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
+    
     if ($use_sent_subfolders || $move_to_sent) {
         $year = date('Y');
         $month = date('m');