X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fmove_messages.php;h=c47024447798924575cd03e8acc913bbd8056830;hb=7e4850ff5cbe4ed0c681b8a64e0741d0a95b2f63;hp=943538656cc62e5d0fddac3b2db9e2c88a763d9e;hpb=76911253eb850bacde3d86c8cb7b4af072e67ebe;p=squirrelmail.git diff --git a/src/move_messages.php b/src/move_messages.php index 94353865..c4702444 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -16,17 +16,17 @@ define('SM_PATH','../'); /* SquirrelMail required files. */ require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/global.php'); require_once(SM_PATH . 'functions/display_messages.php'); require_once(SM_PATH . 'functions/imap.php'); require_once(SM_PATH . 'functions/html.php'); global $compose_new_win; -if (isset($_SESSION['composesession'])) { - $composesession = $_SESSION['composesession']; -} else { - $composesession = 0; -} +if ( !sqgetGlobalVar('composesession', $composesession, SQ_SESSION) ) { + $composesession = 0; +} + /* obsolete ?? */ function putSelectedMessagesIntoString($msg) { $j = 0; @@ -119,64 +119,30 @@ function attachSelectedMessages($msg, $imapConnection) { /* get globals */ +sqgetGlobalVar('key', $key, SQ_COOKIE); +sqgetGlobalVar('username', $username, SQ_SESSION); +sqgetGlobalVar('onetimepad',$onetimepad, SQ_SESSION); +sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); +sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION); -$username = $_SESSION['username']; -$key = $_COOKIE['key']; -$onetimepad = $_SESSION['onetimepad']; -$base_uri = $_SESSION['base_uri']; -$delimiter = $_SESSION['delimiter']; -if (isset($_GET['mailbox'])) { - $mailbox = $_GET['mailbox']; -} -if (isset($_GET['startMessage'])) { - $startMessage = $_GET['startMessage']; -} -if (isset($_POST['moveButton'])) { - $moveButton = $_POST['moveButton']; -} -if (isset($_POST['msg'])) { - $msg = $_POST['msg']; -} -elseif (isset($_GET['msg'])) { - $msg = $_GET['msg']; -} - -if (isset($_SESSION['msgs'])) { - $msgs = $_SESSION['msgs']; -} +sqgetGlobalVar('mailbox', $mailbox); +sqgetGlobalVar('startMessage', $startMessage); +sqgetGlobalVar('msg', $msg); -if (isset($_POST['expungeButton'])) { - $expungeButton = $_POST['expungeButton']; -} -if (isset($_POST['targetMailbox'])) { - $targetMailbox = $_POST['targetMailbox']; -} -if (isset($_SESSION['lastTargetMailbox'])) { - $lastTargetMailbox = $_SESSION['lastTargetMailbox']; -} -if (isset($_POST['expungeButton'])) { - $expungeButton = $_POST['expungeButton']; -} -if (isset($_POST['undeleteButton'])) { - $undeleteButton = $_POST['undeleteButton']; -} -if (isset($_POST['markRead'])) { - $markRead = $_POST['markRead']; -} -if (isset($_POST['markUnread'])) { - $markUnread = $_POST['markUnread']; -} -if (isset($_POST['attache'])) { - $attache = $_POST['attache']; -} +sqgetGlobalVar('msgs', $msgs, SQ_SESSION); +sqgetGlobalVar('composesession', $composesession, SQ_SESSION); +sqgetGlobalVar('lastTargetMailbox', $lastTargetMailbox, SQ_SESSION); -if (isset($_POST['location'])) { - $location = $_POST['location']; -} +sqgetGlobalVar('moveButton', $moveButton, SQ_POST); +sqgetGlobalVar('expungeButton', $expungeButton, SQ_POST); +sqgetGlobalVar('targetMailbox', $targetMailbox, SQ_POST); +sqgetGlobalVar('expungeButton', $expungeButton, SQ_POST); +sqgetGlobalVar('undeleteButton', $undeleteButton, SQ_POST); +sqgetGlobalVar('markRead', $markRead, SQ_POST); +sqgetGlobalVar('markUnread', $markUnread, SQ_POST); +sqgetGlobalVar('attache', $attache, SQ_POST); +sqgetGlobalVar('location', $location, SQ_POST); -if (isset($_SESSION['composesession'])) { - $composesession = $_SESSION['composesession']; -} /* end of get globals */ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);