<?php
/**
-* redirect.php
-* Derived from webmail.php by Ralf Kraudelt <kraude@wiwi.uni-rostock.de>
-*
-* Copyright (c) 1999-2004 The SquirrelMail Project Team
-* Licensed under the GNU GPL. For full terms see the file COPYING.
-*
-* Prevents users from reposting their form data after a successful logout.
-*
-* @version $Id$
-* @package squirrelmail
-*/
+ * Prevents users from reposting their form data after a successful logout.
+ *
+ * Derived from webmail.php by Ralf Kraudelt <kraude@wiwi.uni-rostock.de>
+ *
+ * @copyright © 1999-2006 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @version $Id$
+ * @package squirrelmail
+ */
/**
* Path for SquirrelMail required files.
set_up_language($squirrelmail_language, true);
/* Refresh the language cookie. */
-setcookie('squirrelmail_language', $squirrelmail_language, time()+2592000,
+sqsetcookie('squirrelmail_language', $squirrelmail_language, time()+2592000,
$base_uri);
if (!isset($login_username)) {
include_once(SM_PATH . 'functions/display_messages.php' );
- logout_error( _("You must be logged in to access this page.") );
+ logout_error( _("You must be logged in to access this page.") );
exit;
}
$imapConnection = sqimap_login($login_username, $key, $imapServerAddress, $imapPort, 0);
$sqimap_capabilities = sqimap_capability($imapConnection);
+
+ /* Server side sorting control */
+ if (isset($sqimap_capabilities['SORT']) && $sqimap_capabilities['SORT'] == true &&
+ isset($disable_server_sort) && $disable_server_sort) {
+ unset($sqimap_capabilities['SORT']);
+ }
+
+ /* Thread sort control */
+ if (isset($sqimap_capabilities['THREAD']) && $sqimap_capabilities['THREAD'] == true &&
+ isset($disable_thread_sort) && $disable_thread_sort) {
+ unset($sqimap_capabilities['THREAD']);
+ }
+
sqsession_register($sqimap_capabilities, 'sqimap_capabilities');
$delimiter = sqimap_get_delimiter ($imapConnection);
$username = $login_username;
sqsession_register ($username, 'username');
- setcookie('key', $key, 0, $base_uri);
+ sqsetcookie('key', $key, false, $base_uri);
do_hook ('login_verified');
}
}
if($mailto != '') {
$redirect_url = $location . '/webmail.php?right_frame=compose.php&mailto=';
- $redirect_url .= $mailto;
+ $redirect_url .= urlencode($mailto);
}
/* Write session data and send them off to the appropriate page. */
global $attachment_common_types, $attachment_common_types_parsed;
$attachment_common_types_parsed[$str] = true;
-
- /*
- * Replace ", " with "," and explode on that as Mozilla 1.x seems to
+
+ /*
+ * Replace ", " with "," and explode on that as Mozilla 1.x seems to
* use "," to seperate whilst IE, and earlier versions of Mozilla use
* ", " to seperate
*/
-
+
$str = str_replace( ', ' , ',' , $str );
$types = explode(',', $str);