X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Ffilters%2Foptions.php;h=f70439927823973c143791c8ad25711941277e50;hp=ecfc61397d4af6eb6b20d17f2fc1adc9e21522da;hb=174523e3a1dc61d86e1ab04776665b731a375b8f;hpb=e1728a7ada03ba597fc2f8a800773cb427a711ce diff --git a/plugins/filters/options.php b/plugins/filters/options.php index ecfc6139..f7043992 100644 --- a/plugins/filters/options.php +++ b/plugins/filters/options.php @@ -19,7 +19,7 @@ * Also view plugins/README.plugins for more information. * * @version $Id$ - * @copyright (c) 1999-2004 The SquirrelMail Project Team + * @copyright (c) 1999-2005 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @package plugins * @subpackage filters @@ -84,11 +84,18 @@ if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) { $filter_what = str_replace("\\\"", '"', $filter_what); $filter_what = str_replace('"', '"', $filter_what); + if (empty($filter_what)) { + do_error(_("WARNING! You must enter something to search for.")); + $action = 'edit'; + } + if (($filter_where == 'Header') && (strchr($filter_what,':') == '')) { do_error(_("WARNING! Header filters should be of the format "Header: value"")); $action = 'edit'; } + if ($action != 'edit') { setPref($data_dir, $username, 'filter'.$theid, $filter_where.','.$filter_what.','.$filter_folder); + } $filters[$theid]['where'] = $filter_where; $filters[$theid]['what'] = $filter_what; $filters[$theid]['folder'] = $filter_folder; @@ -121,7 +128,7 @@ if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) { '
'. html_tag( 'table', '', '', '', 'border="0" cellpadding="2" cellspacing="0"' ) . html_tag( 'tr' ) . - html_tag( 'th', _("What to Scan:"), 'right', '', 'nowrap' ) . + html_tag( 'th', _("What to Scan:"), 'right', '', 'style="white-space: nowrap;"' ) . html_tag( 'td', '', 'left' ) . '