Fix prefs so they work under 4.2 as well as 4.1.x. This really needs to
[squirrelmail.git] / plugins / filters / options.php
index cbf2c152a0a05bc446744554be9cdddd123f2bc7..ec836f65a9c9f5a2682f5d98c6fc42c359de70a2 100644 (file)
       $filter_what = str_replace("\\\"", "\"", $filter_what);
       $filter_what = str_replace("\"", """, $filter_what);
 
+      if (($filter_where == 'Header') && (strchr($filter_what,':') == '')) {
+         print ('WARNING! Header filters should be of the format "Header: value"<BR>');
+        $action = 'edit';
+      }
       setPref($data_dir, $username, "filter".$theid, $filter_where.",".$filter_what.",".$filter_folder);
       $filters[$theid]["where"] = $filter_where;
       $filters[$theid]["what"] = $filter_what;