1
0

* Added ability to mark authorgroups as "hidden", so that members of such groups are excluded from common author listings. (Ref http://board.s9y.org/viewtopic.php?f=11&t=16237) (garvinhicking)

This commit is contained in:
Garvin Hicking
2010-01-13 12:28:55 +00:00
parent 456423e040
commit 316e86f3dc
8 changed files with 25 additions and 10 deletions

View File

@ -405,7 +405,12 @@ function serendipity_fetchUsers($user = '', $group = null, $is_count = false) {
$query_group
ORDER BY a.realname ASC";
} else {
if (is_array($group)) {
if ($group === 'hidden') {
$query_join .= "LEFT OUTER JOIN {$serendipity['dbPrefix']}groupconfig AS gc
ON (gc.property = 'hiddenGroup' AND gc.id = ag.groupid AND gc.value = 'true')";
$where .= " AND ISNULL(gc.id) ";
} elseif (is_array($group)) {
foreach($group AS $idx => $groupid) {
$group[$idx] = (int)$groupid;
}
@ -432,7 +437,7 @@ function serendipity_fetchUsers($user = '', $group = null, $is_count = false) {
LEFT OUTER JOIN {$serendipity['dbPrefix']}groups AS g
ON ag.groupid = g.id
$query_join
WHERE g.id IN ($group_sql)
WHERE " . ($group_sql ? "g.id IN ($group_sql)" : '1=1') . "
$where
$query_group
ORDER BY a.realname ASC";