[geeklog-hg] geeklog: Fixed E_ALL error dealing with access to topics

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Fri Jun 8 11:05:02 EDT 2012


changeset 8718:f7afc2013eaf
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/f7afc2013eaf
user: Tom <websitemaster at cogeco.net>
date: Fri Jun 08 11:05:24 2012 -0400
description:
Fixed E_ALL error dealing with access to topics

diffstat:

 public_html/lib-common.php |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 2cac944e46ef -r f7afc2013eaf public_html/lib-common.php
--- a/public_html/lib-common.php	Thu Jun 07 23:37:22 2012 +0200
+++ b/public_html/lib-common.php	Fri Jun 08 11:05:24 2012 -0400
@@ -4290,7 +4290,16 @@
         $commonsql .= " AND onleft = 0";
     }
 
-    if(!empty($topic) && $topic != TOPIC_ALL_OPTION && $topic != TOPIC_HOMEONLY_OPTION && $_TOPICS[TOPIC_getIndex($topic)]['access'] > 0) {
+    // Figure out topic access
+    $topic_access = 0;
+    if(!empty($topic) && $topic != TOPIC_ALL_OPTION && $topic != TOPIC_HOMEONLY_OPTION) {
+        $topic_index = TOPIC_getIndex($topic);
+        if ($topic_index > 0) {
+            $topic_access = $_TOPICS[$topic_index]['access'];
+        }
+    }
+    
+    if(!empty($topic) && $topic != TOPIC_ALL_OPTION && $topic != TOPIC_HOMEONLY_OPTION && $topic_access > 0) {
         // Retrieve list of inherited topics
         $tid_list = TOPIC_getChildList($topic);
         // Get list of blocks to display (except for dynamic). This includes blocks for all topics, and child blocks that are inherited



More information about the geeklog-cvs mailing list