Version 1.1-alpha7()
------------------------------------------------------------------------
+ * Fixed sidebar category plugin to show proper category listing
+ for permission-based restrictions, when "current autho" mode
+ is selected (garvinhicking)
+
* Added experimental XML-engine, for XSLT templating support
(garvinhicking)
}
$where = '';
+
+ if ($authorid === -1 OR $authorid === 0) {
+ $sql_groupid = '0';
+ } else {
+ $sql_groupid = 'ag.groupid';
+ }
+
if ($authorid != 'all' && is_numeric($authorid)) {
$sql_authorid = $authorid;
if (!serendipity_checkPermission('adminCategoriesMaintainOthers', $authorid)) {
- $where = " WHERE (c.authorid = $authorid OR c.authorid = 0)";
+ $where = " WHERE (c.authorid = $authorid OR c.authorid = 0) ";
$where .= "OR (
acl.artifact_type = 'category'
AND acl.artifact_mode = '" . serendipity_db_escape_string($artifact_mode) . "'
LEFT OUTER JOIN {$serendipity['dbPrefix']}authorgroups AS ag
ON ag.authorid = $sql_authorid
LEFT OUTER JOIN {$serendipity['dbPrefix']}access AS acl
- ON (ag.groupid = acl.groupid AND acl.artifact_id = c.categoryid)
+ ON ($sql_groupid = acl.groupid AND acl.artifact_id = c.categoryid)
$where
$group";
if (!empty($order)) {
}
}
- $categories = serendipity_fetchCategories(empty($which_category) ? 'all' : $which_category, '', $sort);
+ $categories = serendipity_fetchCategories(empty($which_category) ? 'all' : $which_category, '', $sort, 'read');
$cat_count = array();
if (serendipity_db_bool($this->get_config('show_count'))) {