[geeklog-hg] geeklog: Fixed staticpage menu item not visible to anonymous use...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Tue Jul 3 10:00:46 EDT 2012
changeset 8765:6eccbaccddb7
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/6eccbaccddb7
user: Tom <websitemaster at cogeco.net>
date: Tue Jul 03 09:52:51 2012 -0400
description:
Fixed staticpage menu item not visible to anonymous users. (bug #0001461)
diffstat:
plugins/staticpages/functions.inc | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r 455ab67878c7 -r 6eccbaccddb7 plugins/staticpages/functions.inc
--- a/plugins/staticpages/functions.inc Tue Jul 03 09:07:25 2012 -0400
+++ b/plugins/staticpages/functions.inc Tue Jul 03 09:52:51 2012 -0400
@@ -111,7 +111,18 @@
$topic_sql = " AND (ta.tid = '" . TOPIC_ALL_OPTION . "')";
}
}
- $topic_sql .= COM_getTopicSQL('AND', 0, 'ta');
+
+ // Have to recheck for homeonly and all since the staticpage could be that
+ $com_topic_sql = COM_getTopicSQL('', 0, 'ta');
+ if ($com_topic_sql != "") {
+ $topic_sql .= " AND (" . $com_topic_sql . "";
+
+ if (COM_onFrontpage()) {
+ $topic_sql .= " OR (ta.tid = '" . TOPIC_HOMEONLY_OPTION . "' OR ta.tid = '" . TOPIC_ALL_OPTION . "'))";
+ } else {
+ $topic_sql .= " OR ta.tid = '" . TOPIC_ALL_OPTION . "')";
+ }
+ }
$sql = "SELECT sp.sp_id, sp.sp_label
FROM {$_TABLES['staticpage']} sp, {$_TABLES['topic_assignments']} ta
More information about the geeklog-cvs
mailing list