[dev] Re: [imp] whitelist patch...

Chuck Hagenbuch chuck at horde.org
Wed Mar 5 10:03:12 PST 2003


Quoting Amith Varghese <amith at xalan.com>:

> So my question is how do I return all addresses that succeded and failed?
> Originally I thought that I would return an array where the index was the
> e-mail address that was submitted for blacklist/whitelist.  The value 
> would be either a success message or a PEAR_Error.  Other than I'm not 
> really sure what you have in mind.

This is the signature for PEAR::raiseError():

    function &raiseError($message = null,
                         $code = null,
                         $mode = null,
                         $options = null,
                         $userinfo = null,
                         $error_class = null,
                         $skipmsg = false)

Pass back the general success/failure message in $message, the overall
success/failure code in $code, and all the extra information you need in
$userinfo (which addresses failed, which were duplicates, etc.). Leave all
the other parameters null.

> I admit this is confusing for someone to be redirected.  Novice users
> might have problems getting back.  But they also might have problems 
> figuring out how to change the blacklist/whitelist if they added an 
> address accidentally.  I thought that when another application gets called 
> the current state got pushed on some sort of stack.  Maybe we can use that 
> to generate a link at the top of the page saying "Back to Mail"  I'm not 
> sure if this is possible but its an idea.

The stack you're speaking of only exists inside each request, not the
session - it has to do with registry calls, not new page views.

How about instead allowing Notification objects to contain a link parameter,
and in the notification about blacklist/whitelist, including a link to view
the appropriate list?

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
I know there's fish out there, but where g-d only knows.


More information about the dev mailing list