Fix E_STRICT notices
[squirrelmail.git] / src / empty_trash.php
index 604b860753e5f1b93b39bd8f762d17dfa619f544..05c5f3a43a237db4ff47ebce12566088d9a8da8b 100644 (file)
@@ -6,12 +6,15 @@
  * Handles deleting messages from the trash folder without
  * deleting subfolders.
  *
- * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @copyright 1999-2012 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
  */
 
+/** This is the empty_trash page */
+define('PAGE_NAME', 'empty_trash');
+
 /**
  * Include the SquirrelMail initialization file.
  */
@@ -27,6 +30,10 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
 
 /* finished globals */
 
+// first do a security check
+sqgetGlobalVar('smtoken', $submitted_token, SQ_GET, '');
+sm_validate_security_token($submitted_token, 3600, TRUE);
+
 $imap_stream = sqimap_login($username, false, $imapServerAddress, $imapPort, 0);
 
 $mailbox = $trash_folder;
@@ -71,4 +78,3 @@ session_write_close();
 $location = get_location();
 header ("Location: $location/left_main.php");
 
-?>