From 2dace654a99396ab674f50829046ed703d3a36be Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Wed, 24 Aug 2011 15:22:49 -0700 Subject: Refs #3746. Updated categories for 1.8. Still some deprecation notices, but functional. --- mod/categories/views/default/input/categories.php | 4 ++++ .../views/default/plugins/categories/settings.php | 22 ++++++++++++++++++++++ .../views/default/settings/categories/edit.php | 22 ---------------------- 3 files changed, 26 insertions(+), 22 deletions(-) create mode 100644 mod/categories/views/default/plugins/categories/settings.php delete mode 100644 mod/categories/views/default/settings/categories/edit.php (limited to 'mod/categories/views') diff --git a/mod/categories/views/default/input/categories.php b/mod/categories/views/default/input/categories.php index 1f71dc0b4..75960d257 100644 --- a/mod/categories/views/default/input/categories.php +++ b/mod/categories/views/default/input/categories.php @@ -23,6 +23,10 @@ if (!empty($categories)) { $categories = array($categories); } + // checkboxes want Label => value, so in our case we need category => category + $categories = array_flip($categories); + array_walk($categories, create_function('&$v, $k', '$v = $k;')); + ?>
diff --git a/mod/categories/views/default/plugins/categories/settings.php b/mod/categories/views/default/plugins/categories/settings.php new file mode 100644 index 000000000..3802da95a --- /dev/null +++ b/mod/categories/views/default/plugins/categories/settings.php @@ -0,0 +1,22 @@ +categories; + +if (empty($categories)) { + $categories = array(); +} + +?> +
+

+ $categories, 'name' => 'categories')); +?> +
\ No newline at end of file diff --git a/mod/categories/views/default/settings/categories/edit.php b/mod/categories/views/default/settings/categories/edit.php deleted file mode 100644 index 3802da95a..000000000 --- a/mod/categories/views/default/settings/categories/edit.php +++ /dev/null @@ -1,22 +0,0 @@ -categories; - -if (empty($categories)) { - $categories = array(); -} - -?> -
-

- $categories, 'name' => 'categories')); -?> -
\ No newline at end of file -- cgit v1.2.3