From edb68514425ca5f23deff10f71a92ad89a38191d Mon Sep 17 00:00:00 2001 From: Pierre Habouzit Date: Thu, 11 Sep 2003 12:33:25 +0000 Subject: [PATCH] bad ksort-ing, valid/cancel must be on the top of the page, even if the filter form is too deep in the page --- philter/philter/include/form_filter.inc.php | 19 +++++++++---------- philter/philter/include/rule.inc.php | 3 ++- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/philter/philter/include/form_filter.inc.php b/philter/philter/include/form_filter.inc.php index 71aa8c4..e81acad 100644 --- a/philter/philter/include/form_filter.inc.php +++ b/philter/philter/include/form_filter.inc.php @@ -5,6 +5,15 @@ if(!empty($_POST['rule'])) require("include/js_factory.inc.php"); ?> +
+ +
+
+ ' name="filter_valid" /> + ' name="filter_cancel" /> +
+
+
-
-
- -
-
- ' name="filter_valid" /> - ' name="filter_cancel" /> -
-
- diff --git a/philter/philter/include/rule.inc.php b/philter/philter/include/rule.inc.php index 402b198..d03d888 100644 --- a/philter/philter/include/rule.inc.php +++ b/philter/philter/include/rule.inc.php @@ -125,8 +125,8 @@ class Rule { function to_js() { $matches = array(); - ksort($this->matches); foreach($this->matches as $data) { + ksort($data); $data = array_map('to_js_str', $data); $matches[] = '[' . implode(',', $data) . ']'; } @@ -134,6 +134,7 @@ class Rule { $actions = array(); foreach($this->actions as $data) { + ksort($data); $data = array_map('to_js_str', $data); $actions[] = '[' . implode(',', $data) . ']'; } -- 2.1.4