Patch categories plugin

This commit is contained in:
Garvin Hicking 2007-01-14 14:56:47 +00:00
parent 855f94e11b
commit e23a9dd640
2 changed files with 10 additions and 1 deletions

View File

@ -23,6 +23,11 @@ Version 1.2 ()
Version 1.1.1 () 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 * Change order of trackback execution flow (again) to preserve
references for plugins like Track Exits, when used in conjunction references for plugins like Track Exits, when used in conjunction
with the entryproperties cache (garvinhicking) with the entryproperties cache (garvinhicking)

View File

@ -1290,7 +1290,7 @@ class serendipity_categories_plugin extends serendipity_plugin {
$propbag->add('description', CATEGORY_PLUGIN_DESC); $propbag->add('description', CATEGORY_PLUGIN_DESC);
$propbag->add('stackable', true); $propbag->add('stackable', true);
$propbag->add('author', 'Serendipity Team'); $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('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')); $propbag->add('groups', array('FRONTEND_VIEWS'));
} }
@ -1482,14 +1482,17 @@ class serendipity_categories_plugin extends serendipity_plugin {
// Hide parents not wanted // Hide parents not wanted
if ($use_parent && $use_parent != 'all') { if ($use_parent && $use_parent != 'all') {
if ($parentdepth == 0 && $cat['parentid'] != $use_parent && $cat['categoryid'] != $use_parent) { if ($parentdepth == 0 && $cat['parentid'] != $use_parent && $cat['categoryid'] != $use_parent) {
unset($categories[$cid]);
continue; continue;
} else { } else {
if ($hide_parent && $cat['categoryid'] == $use_parent) { if ($hide_parent && $cat['categoryid'] == $use_parent) {
unset($categories[$cid]);
continue; continue;
} }
if ($cat['depth'] < $parentdepth) { if ($cat['depth'] < $parentdepth) {
$parentdepth = 0; $parentdepth = 0;
unset($categories[$cid]);
continue; continue;
} }
@ -1506,6 +1509,7 @@ class serendipity_categories_plugin extends serendipity_plugin {
} else { } else {
if ($cat['depth'] < $hidedepth) { if ($cat['depth'] < $hidedepth) {
$hidedepth = 0; $hidedepth = 0;
unset($categories[$cid]);
continue; continue;
} }