If you change working things in configuration either use same case or fix it after...
[squirrelmail.git] / src / folders_subscribe.php
index 5c0433669410da1016ce6b3d44cbf48b41f884c0..761d2e183ea7f67691c4bfc4a2c98c4ef7cde573 100644 (file)
@@ -11,9 +11,9 @@
     **  $Id$
     **/
 
-   include ('../src/validate.php');
-   include("../functions/imap.php");
-   include("../functions/display_messages.php");
+   require_once('../src/validate.php');
+   require_once('../functions/imap.php');
+   require_once('../functions/display_messages.php');
 
    $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
    $dm = sqimap_get_delimiter($imapConnection);
@@ -32,6 +32,9 @@
          header("Location: $location/folders.php?success=unsubscribe");
       }
    }
+   if (!isset($mailbox)) {
+         header("Location: $location/folders.php");
+   }
    sqimap_logout($imapConnection);
 
    /*
@@ -54,4 +57,3 @@
    echo "</BODY></HTML>";
    */
 ?>
-