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

Joerg Friedrich Joerg.Dieter.Friedrich at uni-konstanz.de
Wed Jun 25 12:16:44 PDT 2003


ok, I'm should shut down my computer now. :-)

Patch is now attached.
-- 
Heute ist nicht alle Tage, ich komm' wieder, keine Frage!!!

   Joerg

Pappi, bringt es Unglück, wenn man am Freitag, den 13. heiratet?
Hm, warum soll gerade der Tag eine Ausnahme machen?
-------------- next part --------------
diff -Nurd 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 20:54:46.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:
diff -Nurd ingo/lib/base.php ingo-merkur/lib/base.php
--- ingo/lib/base.php	2003-05-16 00:10:00.000000000 +0200
+++ ingo-merkur/lib/base.php	2003-06-25 20:54:46.000000000 +0200
@@ -58,7 +58,7 @@
 }
 
 // Initialize the global $ingo variable
-$ingo = array();
+#$ingo = array();
 
 // Load the Ingo_Storage module
 require_once INGO_BASE . '/lib/Storage.php';
diff -Nurd 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 20:54:49.000000000 +0200
@@ -18,8 +18,11 @@
     header('Location: ' . Horde::applicationUrl('prefs.php', true));
     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 -Nurd ingo/templates/menu/menu.inc ingo-merkur/templates/menu/menu.inc
--- ingo/templates/menu/menu.inc	2003-04-27 23:14:28.000000000 +0200
+++ ingo-merkur/templates/menu/menu.inc	2003-06-25 20:54:50.000000000 +0200
@@ -18,6 +18,15 @@
     Menu::printItem(Horde::applicationUrl('prefs.php'), _("Options"), 'prefs.gif', $registry->getParam('graphics', 'horde'));
 }
 
+/* Horde menu items */
+if ($conf['problems']['enabled']) {
+    include_once HORDE_BASE . '/lib/Identity.php';
+    $prob_identity = new Identity();
+    Menu::printItem(Horde::url($registry->getParam('webroot', 'horde') . '/problem.php?email='
+. urlencode($prob_identity->getValue('from_addr')) . '&name=' . urlencode($prob_identity->getValue('fullname')) . '&return_url=' . urlencode(Horde::selfURL(true))), _("Problem?"), 'problem.gif', $registry->getParam('graphics', 'horde'));
+}
+ 
+
 /* Additional site-specific menu items */
 if (!empty($additional_items)) echo $additional_items;
 
@@ -30,8 +39,7 @@
 if (isset($conf['menu']['apps']) && is_array($conf['menu']['apps'])) {
     foreach ($conf['menu']['apps'] as $app) {
         Menu::printItem(Horde::url($registry->getInitialPage($app)),
-                        $registry->getParam('name', $app), $registry->getParam('
-icon', $app), '');
+                        $registry->getParam('name', $app), $registry->getParam('icon', $app), '');
     }
 }
 


More information about the ingo mailing list