rg=0 d_m_n
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 25 Sep 2002 18:07:15 +0000 (18:07 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 25 Sep 2002 18:07:15 +0000 (18:07 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3735 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/delete_move_next/setup.php

index a4b34169af58c52c28ec84fe8c6a8e96e8758925..13b81159ce1a438e2d16a95e2b73fc01bcc117dc 100644 (file)
@@ -101,21 +101,31 @@ function delete_move_expunge_from_all($id) {
             arsort($msort);
         }
     }
-    session_register('msgs');
-    session_register('msort');
+    sqsession_register($msgs, 'msgs');
+    sqsession_register($msort, 'msort');
 
     sqimap_mailbox_expunge($imapConnection, $mailbox, true);
 }
 
 function delete_move_next_action() {
 
-    global $PHP_SELF,
-           $delete_id, $move_id;
+    global $PHP_SELF;
 
-    if ($delete_id) {
+    if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+        global $_GET, $_POST;
+    }
+
+    if (isset($_GET['delete_id'])) {
+        $delete_id = $_GET['delete_id'];
+    }
+    if (isset($_POST['move_id'])) {
+        $move_id = $_POST['move_id'];
+    }       
+
+    if (isset($delete_id)) {
         delete_move_next_delete();
         fix_sort_array();
-    } elseif ($move_id) {
+    } elseif (isset($move_id)) {
         delete_move_next_move();
         fix_sort_array();
     }
@@ -284,7 +294,14 @@ function delete_move_next_moveRightMainForm() {
 
 
 function delete_move_next_delete() {
-    global $imapConnection, $delete_id, $mailbox, $auto_expunge;
+    global $imapConnection, $auto_expunge;
+
+    if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+        global $_GET;
+    }
+
+    $delete_id = $_GET['delete_id'];
+    $mailbox = $_GET['mailbox'];
 
     sqimap_messages_delete($imapConnection, $delete_id, $delete_id, $mailbox);
     if ($auto_expunge) {
@@ -294,7 +311,15 @@ function delete_move_next_delete() {
 }
 
 function delete_move_next_move() {
-    global $imapConnection, $move_id, $targetMailbox, $auto_expunge, $mailbox;
+    global $imapConnection, $mailbox;
+
+    if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+        global $_POST;
+    }
+
+    $move_id = $_POST['move_id'];
+    $mailbox = $_POST['mailbox'];
+    $targetMailbox = $_POST['targetMailbox'];
 
     // Move message
     sqimap_messages_copy($imapConnection, $move_id, $move_id, $targetMailbox);
@@ -341,9 +366,24 @@ function delete_move_next_display_inside() {
 
 function delete_move_next_display_save() {
 
-    global $username,$data_dir,
-           $delete_move_next_ti, $delete_move_next_formATtopi,
-           $delete_move_next_bi, $delete_move_next_formATbottomi;
+    global $username,$data_dir;
+
+    if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) {
+        global $_POST;
+    }
+
+    if (isset($_POST['delete_move_next_ti'])) {
+        $delete_move_next_ti = $_POST['delete_move_next_ti'];
+    }
+    if (isset($_POST['delete_move_next_bi'])) {
+        $delete_move_next_bi = $_POST['delete_move_next_bi'];
+    }
+    if (isset($_POST['delete_move_next_formATtopi'])) {
+        $delete_move_next_formATtopi = $_POST['delete_move_next_formATtopi'];
+    }
+    if (isset($_POST['delete_move_next_formATbottomi'])) {
+        $delete_move_next_formATbottomi = $_POST['delete_move_next_formATbottomi'];
+    }
 
     if (isset($delete_move_next_ti)) {
         setPref($data_dir, $username, 'delete_move_next_t', 'on');