[ingo] PATCH RELENG_1: Problems generating more than one rules

Joerg Friedrich Joerg.Dieter.Friedrich at uni-konstanz.de
Wed Jun 25 08:27:23 PDT 2003


Hi, 
I just installed ingo RELENG_1.
First Problem: cannot enter more than one rule.
I think this solves it:

 diff -u ingo/rule.php ingo-merkur/rule.php
--- ingo/rule.php       2003-06-24 22:46:08.000000000 +0200
+++ ingo-merkur/rule.php        2003-06-25 17:02:04.000000000 +0200
@@ -19,7 +19,11 @@
     exit;
 }
  
-$filter = &$_SESSION['ingo']['filters'][$_SESSION['ingo']['edit']];
+if (is_null($_SESSION['ingo']['filters'][$_SESSION['ingo']['edit']])) {
+    $_SESSION['ingo']['filters'][] = array();
+    $_SESSION['ingo']['edit'] = max(array_keys($_SESSION['ingo']['filters']));
+    $filter = &$_SESSION['ingo']['filters'][$_SESSION['ingo']['edit']];
+}
  
 /* Set up default values... */
 $default_filters = array(


diff -u ingo/filters.php ingo-merkur/filters.php
--- ingo/filters.php    2003-05-05 00:44:02.000000000 +0200
+++ ingo-merkur/filters.php     2003-06-25 17:03:20.000000000 +0200
@@ -35,7 +35,7 @@
 case INGO_RULE_NEW:
     $_SESSION['ingo']['edit'] = $id;
     header('Location: ' . Horde::applicationUrl('rule.php'));
-    break;
+    exit;
  
 case INGO_RULE_DELETE:
 case INGO_RULE_COPY:

-- 
Jörg Friedrich
Letzte Worte der Mutter:
  "Ich hab mal deine Disketten sortiert."


More information about the ingo mailing list