[dev] INGO: [patch]

Marc Jauvin marc at register4less.com
Sun Jul 6 09:40:45 PDT 2003


This patch sets the default value for vacation to disabled (otherwise, the
script will contain an "empty" vacation message)

Also, fix for NEW rule creation (was allways editing the LAST rule)

--
Marc Jauvin
450-441-5458
http://register4less.com
-------------- next part --------------
Index: rule.php
===================================================================
RCS file: /repository/ingo/rule.php,v
retrieving revision 1.39
diff -u -r1.39 rule.php
--- rule.php    5 Jul 2003 18:57:22 -0000       1.39
+++ rule.php    6 Jul 2003 16:36:49 -0000
@@ -107,6 +107,10 @@
 }
 $rule = &$ingo_rules[$edit_number];

+if (!isset($edit_number)) {
+    $edit_number = count($ingo_rules);
+}
+
 /* Set up default values... */
 $default_rules = array(
     'name' => _("New Rule"),
Index: config/prefs.php.dist
===================================================================
RCS file: /repository/ingo/config/prefs.php.dist,v
retrieving revision 1.23
diff -u -r1.23 prefs.php.dist
--- config/prefs.php.dist       5 Jul 2003 23:28:51 -0000       1.23
+++ config/prefs.php.dist       6 Jul 2003 16:36:49 -0000
@@ -167,7 +167,7 @@

 // filter rules
 $_prefs['rules'] = array(
-    'value' => 'a:4:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:9;}i:1;a:2:{s:4:"name";s:8:"Vacation";s:6:"action";i:8;}i:2;a:2:{s:4:"name";s:9:"Blacklist";s:6:"action";i:7;}i:3;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:10;}}',
+    'value' => 'a:4:{i:0;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:9;}i:1;a:3:{s:4:"name";s:8:"Vacation";s:6:"action";i:8;s:7:"disable";b:1;}i:2;a:2:{s:4:"name";s:9:"Blacklist";s:6:"action";i:7;}i:3;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:10;}}',
     'locked' => false,
     'shared' => false,
     'type' => 'implicit'


More information about the dev mailing list