[sork] Question about vacation/main.php

Richard Heggs richard.heggs at nottinghamcity.gov.uk
Tue Dec 2 08:58:57 PST 2003


Hi list,

There is comment in vacation/main.php:
// If we can tell if vacation notices are enabled, then say so. But if
// this fails, it could be because it is disabled, or just because we
// can't tell, so just be quiet about it.

I know that my users would really appreciate confirmation of the current
status of their vacation message.  I'm reworking the LDAP driver to have an
'on/off' flag as well as a vacation message, so from an LDAP point of view
we can always tell whether vacation is on or off.

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

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'];
}

with:

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.

--
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.
######################################################################


More information about the sork mailing list