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

index 405fcad558a2111c61a6969cb1f8175b73992d19..49f9b06f25c1a4ef1bb3cfe82ec16284289f7374 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -23,6 +23,11 @@ Version 1.2 ()
 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;
                         }