Lots of changes for variable initialization - clean up, really,
[squirrelmail.git] / src / folders_delete.php
index dbd915b22f5dd637b1e523b4c9f7a41b71dafbbf..58e6fe2c89a2544b129298facdebd911a6c439f3 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * folders_delete.php
  *
- * 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.
  *
  * Deletes folders from the IMAP server. 
@@ -28,13 +28,11 @@ require_once(SM_PATH . 'functions/html.php');
  */
 
 /* globals */
-$username = $_SESSION['username'];
-$key = $_COOKIE['key'];
-$delimiter = $_SESSION['delimiter'];
-$onetimepad = $_SESSION['onetimepad'];
-
-$mailbox = $_POST['mailbox'];
-
+sqgetGlobalVar('key',       $key,           SQ_COOKIE);
+sqgetGlobalVar('username',  $username,      SQ_SESSION);
+sqgetGlobalVar('onetimepad',$onetimepad,    SQ_SESSION);
+sqgetGlobalVar('delimiter', $delimiter,     SQ_SESSION);
+sqgetGlobalVar('mailbox',   $mailbox,       SQ_POST);
 /* end globals */
 
 if ($mailbox == '') {
@@ -45,13 +43,13 @@ if ($mailbox == '') {
     exit;
 }
 
-if (isset($_POST['backingout'])) {
+if ( sqgetGlobalVar('backingout', $tmp, SQ_POST) ) {
     $location = get_location();
     header ("Location: $location/folders.php");
     exit;
 }
 
-if(!isset($_POST['confirmed'])) {
+if( !sqgetGlobalVar('confirmed', $tmp, SQ_POST) ) {
     displayPageHeader($color, 'None');
 
     echo '<br>' .
@@ -61,7 +59,7 @@ if(!isset($_POST['confirmed'])) {
         ) .
         html_tag( 'tr' ) .
         html_tag( 'td', '', 'center', $color[4] ) .
-        sprintf(_("Are you sure you want to delete %s?"), $mailbox).
+        sprintf(_("Are you sure you want to delete %s?"), imap_utf7_decode_local($mailbox)).
         '<FORM ACTION="folders_delete.php" METHOD="POST"><p>'.
 
         '<INPUT TYPE=HIDDEN NAME="mailbox" VALUE="'.$mailbox."\">\n" .