From 0e7430045020db8766f6d15269c6dff912810686 Mon Sep 17 00:00:00 2001 From: lkehresman Date: Sun, 13 Aug 2000 13:09:37 +0000 Subject: [PATCH] fixed problems in sent/trash folder creating changed title of login page to be "$org_name - Login" git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@708 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/folders.php | 71 ++++++++++++++++++++----------------------------- src/login.php | 2 +- 2 files changed, 30 insertions(+), 43 deletions(-) diff --git a/src/folders.php b/src/folders.php index 84746644..827a1eb1 100644 --- a/src/folders.php +++ b/src/folders.php @@ -49,7 +49,16 @@ echo "" . _("Created folder successfully!") . "
"; } else if ($success == "rename") { echo "" . _("Renamed successfully!") . "
"; + } else if (($sent_create == "true") || ($trash_create == "true")) { + if ($sent_create == "true") { + sqimap_mailbox_create ($imapConnection, $sent_folder, ""); + } + if ($trash_create == "true") { + sqimap_mailbox_create ($imapConnection, $trash_folder, ""); + } + echo _("Folders created successfully!"); } + echo " " . _("refresh folder list") . ""; echo " \n"; echo "
\n"; @@ -57,47 +66,25 @@ $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 "\n"; + echo ""; + echo "
"; + echo _("Special Folder Options"); + echo "
"; + echo _("In order for SquirrelMail to provide the full set of options you need to create the special folders listed below. Just click the check box and hit the create button."); + echo "
\n"; + if (!sqimap_mailbox_exists ($imapConnection, $sent_folder) && $sent_folder != "none") { + echo _("Create Sent") . "
\n"; + } + if (!sqimap_mailbox_exists ($imapConnection, $trash_folder) && $trash_folder != "none"){ + echo _("Create Trash") . "
\n"; + } + echo ""; + echo "

"; } - if ($trash_create == "true") { - sqimap_mailbox_create ($imapConnection, $trash_folder, ""); - } - echo "

"; - echo _("Mailboxes Created Successfully!"); - echo "
"; - echo _("Click here"); - echo " "; - echo _("to continue."); - echo "
"; - echo ""; - - sqimap_logout($imapConnection); - exit; - } - -//display form option for creating Sent and Trash folder - if ($imap_server_type == "cyrus") { - if ((!sqimap_mailbox_exists ($imapConnection, $sent_folder)) || (!sqimap_mailbox_exists ($imapConnection, $trash_folder))) { - echo "\n"; - echo ""; - echo "
"; - echo _("Special Folder Options"); - echo "
"; - echo _("In order for SquirrelMail to provide the full set of options you need to create the special folders listed below. Just click the check box and hit the create button."); - echo "
\n"; - if (!sqimap_mailbox_exists ($imapConnection, $sent_folder)) { - echo _("Create Sent") . "
\n"; - } - if (!sqimap_mailbox_exists ($imapConnection, $trash_folder)){ - echo _("Create Trash") . "
\n"; - echo ""; - } - } - echo "
n"; } /** DELETING FOLDERS **/ @@ -148,7 +135,7 @@ echo "\">\n"; echo "\n"; } else { - echo _("No mailboxes found") . "

"; + echo _("No folders found") . "

"; } echo " \n"; @@ -244,7 +231,7 @@ echo "\">\n"; echo "\n"; } else { - echo _("No mailboxes found") . "

"; + echo _("No folders found") . "

"; } $boxes_sub = $boxes; diff --git a/src/login.php b/src/login.php index cc4de213..bea0c0bc 100644 --- a/src/login.php +++ b/src/login.php @@ -57,7 +57,7 @@ echo ""; echo ""; - echo _("SquirrelMail Login"); + echo $org_name . " - " . _("Login"); echo "\n"; echo "\n"; -- 2.25.1