X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Ffolders_rename_do.php;h=37fbf311bcdebba1127a1c4197174ec62b3fd48b;hb=e235ccb25b93f180692370bfa451d0c94075d5be;hp=99324ca09170d7b97012bc2bef304c18edb9a7dd;hpb=d4e84069d1d9af8760b8e858672d3ea3d4eac8b0;p=squirrelmail.git diff --git a/src/folders_rename_do.php b/src/folders_rename_do.php index 99324ca0..37fbf311 100644 --- a/src/folders_rename_do.php +++ b/src/folders_rename_do.php @@ -34,8 +34,10 @@ else $newone = "$new_name"; - fputs ($imapConnection, ". RENAME \"$orig\" \"$newone\"\r\n"); - $data = sqimap_read_data($imapConnection, ".", true, $a, $b); + $cmd = "a024 RENAME \"" . quoteIMAP($orig) . "\" \"" . + quoteIMAP($newone) . "\"\r\n"; + fputs ($imapConnection, $cmd); + $data = sqimap_read_data($imapConnection, "a024", true, $a, $b); // Renaming a folder doesn't renames the folder but leaves you unsubscribed // at least on Cyrus IMAP servers. @@ -46,7 +48,8 @@ sqimap_unsubscribe($imapConnection, $orig); sqimap_subscribe($imapConnection, $newone); - fputs ($imapConnection, "a001 LIST \"\" \"$newone*\"\r\n"); + fputs ($imapConnection, "a001 LIST \"\" \"" . quoteIMAP($newone) . + "*\"\r\n"); $data = sqimap_read_data($imapConnection, "a001", true, $a, $b); for ($i=0; $i < count($data); $i++) {