X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders.php;h=f727337be6ac07b42effff21ec0c53edafcaa00d;hb=f740c049d91feb836dd9633be9e8ff52c00d066f;hp=ce164ae0b16017ba6a34afd7434b7cc029324f14;hpb=c36ed9cfc1635cd9a8f80d9cdf8200628777903f;p=squirrelmail.git diff --git a/src/folders.php b/src/folders.php index ce164ae0..f727337b 100644 --- a/src/folders.php +++ b/src/folders.php @@ -8,93 +8,104 @@ ** Handles all interaction between the user and the other folder ** scripts which do most of the work. Also handles the Special ** Folders. + ** + ** $Id$ **/ - session_start(); - - if (!isset($config_php)) - include("../config/config.php"); - if (!isset($strings_php)) - include("../functions/strings.php"); - if (!isset($page_header_php)) - include("../functions/page_header.php"); - if (!isset($imap_php)) - include("../functions/imap.php"); - if (!isset($array_php)) - include("../functions/array.php"); - + include('../src/validate.php'); + include("../functions/strings.php"); + include("../config/config.php"); + include("../functions/page_header.php"); + include("../functions/imap.php"); + include("../functions/array.php"); + include("../functions/plugin.php"); include("../src/load_prefs.php"); - displayPageHeader($color, "None"); + displayPageHeader($color, _("None")); - echo "
\n";
+ echo " "; + echo "
\n"; + } $imapConnection = sqimap_login ($username, $key, $imapServerAddress, $imapPort, 0); $boxes = sqimap_mailbox_list($imapConnection); - /** Cyrus Folder Options**/ -//Creates the Sent and Trash folder - if (($sent_create == "true") || ($trash_create == "true")) { - if ($sent_create == "true") { - sqimap_mailbox_create ($imapConnection, $sent_folder, ""); + //display form option for creating Sent and Trash folder + if ($imap_server_type == "cyrus" && ($sent_folder != "none" || $trash_folder != "none")) { + if ((!sqimap_mailbox_exists ($imapConnection, $sent_folder)) || + (!sqimap_mailbox_exists ($imapConnection, $trash_folder))) { + echo "
"; } - if ($trash_create == "true") { - sqimap_mailbox_create ($imapConnection, $trash_folder, ""); - } - echo " "; - echo _("Click here"); - echo " "; - echo _("to continue."); - echo " |