On 25.06.2010 17:58, Marcus Don wrote:
> My suggestion is simply to add an "abort_message" element to the $args
> array, which can be checked by each of the action scripts. For example,
> in save_identity.inc we just need to replace each occurrence of this...
>
> else if ($plugin['abort'] || $DB->is_error())
> $OUTPUT->show_message('errorsaving', 'error', null, false);
>
> ...with this...
>
> } else if ($plugin['abort'] || $DB->is_error()) {
> if (isset($plugin['abort_message']) && $plugin['abort_message'] != '') {
> $OUTPUT->command('display_message', $plugin['abort_message'], 'error',
> false);
> } else {
> $OUTPUT->show_message('errorsaving', 'error', null, false);
> }
> }
Maybe we just shouldn't display error messages when plugin uses abort?
Plugin writers could call $OUTPUT->show_message() from the plugin. So
if ($plugin['abort'] || $DB->is_error()) {
if (!$plugin['abort'])
$OUTPUT->show_message('errorsaving', 'error', null, false);
...
}
--
Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252
LAN Management System Developer http://lms.org.pl
Roundcube Webmail Developer http://roundcube.net
_______________________________________________
List info: http://lists.roundcube.net/dev/