From: garvinhicking Date: Wed, 14 Sep 2005 17:36:47 +0000 (+0000) Subject: Also acceppt "NULL" as authorid. Thanks to Mark Kubacki! X-Git-Tag: 0.9~143 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=dde52ce031daa7916fea37e832ce60a710f9291f;p=s9y.git Also acceppt "NULL" as authorid. Thanks to Mark Kubacki! --- diff --git a/include/functions_config.inc.php b/include/functions_config.inc.php index 9b6cf0a..180284c 100644 --- a/include/functions_config.inc.php +++ b/include/functions_config.inc.php @@ -1018,7 +1018,7 @@ function serendipity_ACLCheck($authorid, $artifact_id, $artifact_type, $artifact $artifact_sql['cond'] = "atf.categoryid = " . (int)$artifact_id; $artifact_sql['where'] = " ag.groupid = a.groupid OR a.groupid = 0 - OR (a.artifact_type IS NULL AND (atf.authorid = " . (int)$authorid . " OR atf.authorid = 0))"; + OR (a.artifact_type IS NULL AND (atf.authorid = " . (int)$authorid . " OR atf.authorid = 0 OR atf.authorid IS NULL))"; $artifact_sql['table'] = 'category'; } @@ -1089,7 +1089,7 @@ function serendipity_ACL_SQL(&$cond, $append_category = false) { " . (isset($serendipity['GET']['adminModule']) && $serendipity['GET']['adminModule'] == 'entries' && !serendipity_checkPermission('adminEntriesMaintainOthers') - ? "AND (c.authorid = 0 OR c.authorid = " . $read_id . ")" + ? "AND (c.authorid IS NULL OR c.authorid = 0 OR c.authorid = " . $read_id . ")" : "") . " ) )";