From: Tyler A. <fi...@us...> - 2001-07-27 23:09:55
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory usw-pr-cvs1:/tmp/cvs-serv989/functions Modified Files: imap_mailbox.php Log Message: Warnings were removed Removed 'echo' line in folders_rename_do that was causing problems Removed Ray's preference code from left_main.php (he said he would do it, but he never did follow through) Now checks to see if the folder is subscribed before actually subscribing the folder (the proper fix to the problem Ray tried to fix) Found a bug -- I can't unsubscribe from a folder. Index: imap_mailbox.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/imap_mailbox.php,v retrieving revision 1.83 retrieving revision 1.84 diff -u -w -r1.83 -r1.84 --- imap_mailbox.php 2001/07/09 20:28:28 1.83 +++ imap_mailbox.php 2001/07/27 23:09:53 1.84 @@ -103,6 +103,19 @@ $read_ary = sqimap_read_data($imap_stream, "a001", true, $response, $message); sqimap_unsubscribe ($imap_stream, $mailbox); } + + /*********************************************************************** + ** Determines if the user is subscribed to the folder or not + **********************************************************************/ + function sqimap_mailbox_is_subscribed($imap_stream, $folder) { + $boxes = sqimap_mailbox_list ($imap_stream); + foreach ($boxes as $ref) { + if ($ref['unformatted'] == $folder) + return true; + } + return false; + } + /****************************************************************************** |