[geeklog-hg] geeklog: Fixed sql error if user doesn't have access to topic or...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Thu Jun 7 15:40:05 EDT 2012
changeset 8716:7c1fe86d0cc4
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/7c1fe86d0cc4
user: Tom <websitemaster at cogeco.net>
date: Thu Jun 07 15:40:10 2012 -0400
description:
Fixed sql error if user doesn't have access to topic or topic does not exist (bug #0001452)
diffstat:
public_html/index.php | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (15 lines):
diff -r 839e575d6b82 -r 7c1fe86d0cc4 public_html/index.php
--- a/public_html/index.php Thu Jun 07 17:11:20 2012 +0200
+++ b/public_html/index.php Thu Jun 07 15:40:10 2012 -0400
@@ -256,6 +256,11 @@
if (!empty($topic)) {
// Retrieve list of inherited topics
$tid_list = TOPIC_getChildList($topic);
+
+ // Could have empty list if $topic does not exist or does not have permission so let it equal topic and will error out properly at end
+ if (empty($tid_list)) {
+ $tid_list = "'" . $topic . "'";
+ }
// Get list of blocks to display (except for dynamic). This includes blocks for all topics, and child blocks that are inherited
$sql .= " AND (ta.tid IN({$tid_list}) AND (ta.inherit = 1 OR (ta.inherit = 0 AND ta.tid = '{$topic}')))";
} elseif (!$newstories) {
More information about the geeklog-cvs
mailing list