-
- if ( $boxesall ) {
- // Sub-unsub subfolders
- $l = strlen( $old_name ) + 1;
- $p = 'unformatted';
- foreach ( $boxesall as $box ) {
- if ( substr( $box[$p], 0, $l ) == $old_name . $delimiter ) {
- sqimap_unsubscribe($imap_stream, $box[$p]);
- sqimap_subscribe($imap_stream,
- $new_name . $delimiter . substr( $box[$p], $l ) );
+ $l = strlen( $old_name ) + 1;
+ $p = 'unformatted';
+ foreach ( $boxesall as $box ) {
+ if ( substr( $box[$p], 0, $l ) == $old_name . $delimiter ) {
+ $new_sub = $new_name . $delimiter . substr($box[$p], $l);
+ if ($imap_server_type == 'cyrus') {
+ $cmd = 'RENAME "' . quoteIMAP($box[$p]) . '" "' . quoteIMAP($new_sub) . '"';
+ $data = sqimap_run_command($imap_stream, $cmd, TRUE,
+ $response, $message);