Re: Small Question in imap_mailbox.php function..
Michael Peddemors <[email protected]>
| Newsgroups | gmane.mail.squirrelmail.devel |
|---|---|
| Organization | Wizard IT Services |
| Message-ID | <[email protected]> |
Paul, not sure if you are right in this perspective.. isSpecialMailbox will be comparing data from external sources, that may have a case sensitvity issue beyond the plugin writers control.. eg, comparing a mailbox name from sqimap_mailbox_list(), does the plugin writer know that when he set it, to either say 'spam' or 'Spam' that the behavior will be constant? Basically, we have to determine whether isSpecialMailbox should be a case sensitive form.. We should stay consistant.. you are doing strtolower() on Inbox, so they expected behavior, if that function treats both Inbox and inbox as special, that the same behavior will applied in the plugin.. Otherwise core doesn't have to set two values, but the plugin writer does. Not Fair..;) On Monday 26 May 2008 17:19, Paul Lesniewski wrote: > On Mon, May 26, 2008 at 3:37 PM, Michael Peddemors > > <[email protected]> wrote: > > Should it not be: > > > > $ret = boolean_hook_function('special_mailbox',strtolower($box),1); > > You're saying you want the strtolower applied? It may have originally > been an oversight, but OTOH, I'd say it's actually more correct and > sometimes useful to pass any data to a plugin from the core in its > most raw form, and in this case, that means your plugin has to > remember to take care of any details such as applying strtolower. > > Cheers, > > Paul > > > In the function below... > > > > > > /** > > * Defines special mailboxes: given a mailbox name, it checks if this is > > a * "special" one: INBOX, Trash, Sent or Draft. > > */ > > function isSpecialMailbox( $box ) { > > global $trash_folder, $sent_folder, $draft_folder, > > $move_to_trash, $move_to_sent, $save_as_draft; > > > > $ret = ( (strtolower($box) == 'inbox') || > > isTrashMailbox($box) || isSentMailbox($box) || > > isDraftMailbox($box) ); > > > > if ( !$ret ) { > > $ret = boolean_hook_function('special_mailbox',$box,1); > > } > > return $ret; > > } > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ----- > squirrelmail-devel mailing list > Posting guidelines: http://squirrelmail.org/postingguidelines > List address: [email protected] > List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel > List info (subscribe/unsubscribe/change options): > https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel -- "Products, Services and Support..." ------------------------------------------------------------------------ Michael Peddemors - President/CEO - Wizard IT Services "Servicing the ISP, Telco and Enterprise Markets since 1997" ------------------------------------------------------------------------ A Wizard IT Company - For More Info http://www.wizard.ca "Wizard IT" is a company TradeMark of Wizard Tower TechnoServices Ltd. ------------------------------------------------------------------------ 604-589-0037 Beautiful British Columbia, Canada This email and any electronic data contained are confidential and intended solely for the use of the individual or entity to which they are addressed. Please note that any views or opinions presented in this email are solely those of the author and are not intended to represent those of the company. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ ----- squirrelmail-devel mailing list Posting guidelines: http://squirrelmail.org/postingguidelines List address: [email protected] List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel