]> git.mjollnir.org Git - s9y.git/commitdiff
Patch categories plugin
authorgarvinhicking <garvinhicking>
Sun, 14 Jan 2007 14:56:22 +0000 (14:56 +0000)
committergarvinhicking <garvinhicking>
Sun, 14 Jan 2007 14:56:22 +0000 (14:56 +0000)
docs/NEWS
include/plugin_internal.inc.php

index ee7c412d8348d97a826aef0dedd99d56cb5209d5..9e54d12284ed74b75e7ac6f67e1b03f2b9467c45 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,11 @@
 Version 1.1.1 ()
 ------------------------------------------------------------------------
 
+    * Make categories sidebar plugin properly return evaluated categories
+      list to plugin_categories.tpl template. Currently, a hidden
+      structure would only be displayed when not using custom template.
+      (garvinhicking)
+
     * Change order of trackback execution flow (again) to preserve
       references for plugins like Track Exits, when used in conjunction
       with the entryproperties cache (garvinhicking)
index fefade7e055277039e4516418c47b9d66e4ca355..fa267ad862321538ef654f4f4bb2678576738ca5 100644 (file)
@@ -1290,7 +1290,7 @@ class serendipity_categories_plugin extends serendipity_plugin {
         $propbag->add('description', CATEGORY_PLUGIN_DESC);
         $propbag->add('stackable',     true);
         $propbag->add('author',        'Serendipity Team');
-        $propbag->add('version',       '2.01');
+        $propbag->add('version',       '2.02');
         $propbag->add('configuration', array('title', 'authorid', 'parent_base', 'hide_parent', 'image', 'sort_order', 'sort_method', 'allow_select', 'hide_parallel', 'show_count', 'smarty'));
         $propbag->add('groups',        array('FRONTEND_VIEWS'));
     }
@@ -1482,14 +1482,17 @@ class serendipity_categories_plugin extends serendipity_plugin {
                 // Hide parents not wanted
                 if ($use_parent && $use_parent != 'all') {
                     if ($parentdepth == 0 && $cat['parentid'] != $use_parent && $cat['categoryid'] != $use_parent) {
+                        unset($categories[$cid]);
                         continue;
                     } else {
                         if ($hide_parent && $cat['categoryid'] == $use_parent) {
+                            unset($categories[$cid]);
                             continue;
                         }
 
                         if ($cat['depth'] < $parentdepth) {
                             $parentdepth = 0;
+                            unset($categories[$cid]);
                             continue;
                         }
 
@@ -1506,6 +1509,7 @@ class serendipity_categories_plugin extends serendipity_plugin {
                     } else {
                         if ($cat['depth'] < $hidedepth) {
                             $hidedepth = 0;
+                            unset($categories[$cid]);
                             continue;
                         }