[sork] Question about vacation/main.php

Eric Rostetter eric.rostetter at physics.utexas.edu
Tue Dec 2 13:43:12 PST 2003


Quoting Richard Heggs <richard.heggs at nottinghamcity.gov.uk>:

> Question: can all of the other backends tell whether or not there is an
> active vacation message?  If so, I propose to replace:

No, not really.

> if ($driver->isEnabled($user, $realm, $pass)) {
>     $curmessage = $driver->currentMessage($user, $realm, $pass);
>     $notification->push(_("Your vacation notice is currently enabled."),
> 'horde.success');
> } else {
>     $curmessage = $conf['vacation']['default'];
>     $notification->push(_("Your vacation notice is currently disabled."),
> 'horde.warning');
>
> }
>
> ...otherwise I'll have to think of another way to do it.

Rewrite it to return 3 values rather than true/false.  Could return instead
"yes", "no", and "unknown" or something like that.  Then do a 3-case if
instead of a 2-case if.

> --
> Richard Heggs
> Systems Analyst
> Nottingham City Council
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
> ######################################################################
> This e-mail (and any attachments) is confidential and may contain personal
> views which are not the views of Nottingham City Council unless specifically
> stated. If you have received it in error, please delete it from your system,
> do not use, copy or disclose the information in any way nor act in reliance
> on it and notify the sender immediately. Please note that Nottingham City
> Council monitors e-mails sent or received. Further communication will
> signify your consent to this.
> ######################################################################
> --
> Sork mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: sork-unsubscribe at lists.horde.org
>


--
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Why get even? Get odd!


More information about the sork mailing list