X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders_create.php;h=3bbe0e6667d35a7a6187177d8a0043c9d0c1bdcf;hb=245a6892bf5c780904ef9677f24d624ea17e0749;hp=6ce2afe5e9435c8195e153d5bfd63825657357b7;hpb=ed4332d1ce7dc32d4af42d75c1d52d3d89730b2f;p=squirrelmail.git diff --git a/src/folders_create.php b/src/folders_create.php index 6ce2afe5..3bbe0e66 100644 --- a/src/folders_create.php +++ b/src/folders_create.php @@ -1,17 +1,64 @@ - - - -"; + plain_error_message(_("Illegal folder name. Please select a different name.")."
"._("Click here to go back").".", $color); + sqimap_logout($imapConnection); + exit; + } + + if ($contain_subs == true) + $folder_name = "$folder_name$dm"; + + if ($folder_prefix && (substr($folder_prefix, -1) != $dm)) { + $folder_prefix = $folder_prefix . $dm; + } + if ($folder_prefix && (substr($subfolder, 0, strlen($folder_prefix)) != $folder_prefix)){ + $subfolder_orig = $subfolder; + $subfolder = $folder_prefix . $subfolder; + } else { + $subfolder_orig = $subfolder; + } + + if ((trim($subfolder_orig) == "[ None ]") || (trim(sqStripSlashes($subfolder_orig)) == "[ None ]")) { + sqimap_mailbox_create ($imapConnection, $folder_prefix.$folder_name, ""); + } else { + sqimap_mailbox_create ($imapConnection, $subfolder.$dm.$folder_name, ""); + } fputs($imapConnection, "1 logout\n"); - echo "


You will be automatically forwarded.
If not, click here
"; + $location = get_location(); + header ("Location: $location/folders.php?success=create"); + sqimap_logout($imapConnection); ?> -