1
0

Require category joins in some cases, add smarty params for new fetchentry features

This commit is contained in:
Garvin Hicking
2007-07-17 08:43:06 +00:00
parent 1c41e716af
commit 1e846ef160
2 changed files with 35 additions and 2 deletions

View File

@ -384,13 +384,16 @@ function &serendipity_fetchEntries($range = null, $full = true, $limit = '', $fe
LEFT JOIN {$serendipity['dbPrefix']}authors a
ON e.authorid = a.authorid";
}
if ($joincategories) {
if ($joincategories || !isset($serendipity['enableACL']) || $serendipity['enableACL'] == true) {
// Category joins are REQUIRED when the ACLs are enabled.
$serendipity['fullCountQuery'] .= "
LEFT JOIN {$serendipity['dbPrefix']}entrycat ec
ON e.id = ec.entryid
LEFT JOIN {$serendipity['dbPrefix']}category c
ON ec.categoryid = c.categoryid";
}
$serendipity['fullCountQuery'] .="
{$cond['joins']}
{$cond['and']}";