From 197601ef5fa2e6aaabfb6e0baaf56179f7cc1ee3 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 30 Apr 2008 04:21:42 -0400
Subject: [PATCH] Next step: introduce the application class 'rcmail' and get rid of some global vars

---
 program/steps/settings/manage_folders.inc |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/program/steps/settings/manage_folders.inc b/program/steps/settings/manage_folders.inc
index a00ff9f..49f9491 100644
--- a/program/steps/settings/manage_folders.inc
+++ b/program/steps/settings/manage_folders.inc
@@ -20,10 +20,10 @@
 */
 
 // init IMAP connection
-rcmail_imap_init(TRUE);
+$RCMAIL->imap_init(true);
 
 // subscribe to one or more mailboxes
-if ($_action=='subscribe')
+if ($RCMAIL->action=='subscribe')
   {
   if ($mbox = get_input_value('_mbox', RCUBE_INPUT_POST))
     $IMAP->subscribe(array($mbox));
@@ -33,7 +33,7 @@
   }
 
 // unsubscribe one or more mailboxes
-else if ($_action=='unsubscribe')
+else if ($RCMAIL->action=='unsubscribe')
   {
   if ($mbox = get_input_value('_mbox', RCUBE_INPUT_POST))
     $IMAP->unsubscribe(array($mbox));
@@ -43,7 +43,7 @@
   }
 
 // create a new mailbox
-else if ($_action=='create-folder')
+else if ($RCMAIL->action=='create-folder')
   {
   if (!empty($_POST['_name']))
     $create = $IMAP->create_mailbox(trim(get_input_value('_name', RCUBE_INPUT_POST, FALSE, 'UTF-7')), TRUE);
@@ -62,7 +62,7 @@
   }
 
 // rename a mailbox
-else if ($_action=='rename-folder')
+else if ($RCMAIL->action=='rename-folder')
   {
   if (!empty($_POST['_folder_oldname']) && !empty($_POST['_folder_newname']))
     $rename = $IMAP->rename_mailbox(($oldname = get_input_value('_folder_oldname', RCUBE_INPUT_POST)), trim(get_input_value('_folder_newname', RCUBE_INPUT_POST, FALSE, 'UTF-7')));
@@ -97,7 +97,7 @@
   }
 
 // delete an existing IMAP mailbox
-else if ($_action=='delete-folder')
+else if ($RCMAIL->action=='delete-folder')
   {
   $a_mboxes = array_merge($IMAP->list_mailboxes(), $IMAP->list_unsubscribed());
   $delimiter = $IMAP->get_hierarchy_delimiter();

--
Gitblit v1.9.1