[geeklog-hg] geeklog: Related Topics and What's Related block now return topi...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Jul 14 09:22:42 EDT 2013
changeset 9193:4522161bf952
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/4522161bf952
user: Tom <websitemaster at cogeco.net>
date: Sat Jul 13 14:23:26 2013 -0400
description:
Related Topics and What's Related block now return topics based on permissions and language
diffstat:
system/lib-topic.php | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (22 lines):
diff -r d55f92134c69 -r 4522161bf952 system/lib-topic.php
--- a/system/lib-topic.php Sat Jul 13 14:17:21 2013 -0400
+++ b/system/lib-topic.php Sat Jul 13 14:23:26 2013 -0400
@@ -1037,7 +1037,7 @@
FROM {$_TABLES['topics']} t, {$_TABLES['topic_assignments']} ta
WHERE t.tid = ta.tid
AND ta.type = '$type' AND ta.id = '$id'
- " . COM_getPermSQL('AND', 0, 2, 't')
+ " . COM_getPermSQL('AND', 0, 2, 't') . COM_getLangSQL('tid', 'AND', 't')
. " ORDER BY tdefault DESC, topic ASC";
} elseif ($uid > 0) {
// Need to add code to retrieve topics assigments a specified user has access too
@@ -1481,7 +1481,8 @@
// Retrieve Topic options
$sql = "SELECT ta.tid, t.topic
FROM {$_TABLES['topic_assignments']} ta, {$_TABLES['topics']} t
- WHERE t.tid = ta.tid AND ta.type = '$type' AND ta.id ='$id' " . COM_getLangSQL('tid', 'AND', 't') . "
+ WHERE t.tid = ta.tid AND ta.type = '$type' AND ta.id ='$id'
+ " . COM_getPermSQL('AND', 0, 2, 't') . COM_getLangSQL('tid', 'AND', 't') . "
AND t.tid != '" . TOPIC_ALL_OPTION . "' AND t.tid != '" . TOPIC_HOMEONLY_OPTION . "'";
} else {
$sql = "SELECT tid, topic
More information about the geeklog-cvs
mailing list