[geeklog-cvs] geeklog: Fixed checking of permissions issue in breadcrumbs when...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon Jan 23 13:35:16 EST 2012
changeset 8482:e24fa62db1ea
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e24fa62db1ea
user: Tom <websitemaster at cogeco.net>
date: Mon Jan 23 12:49:32 2012 -0500
description:
Fixed checking of permissions issue in breadcrumbs when user doesn't have access to one of the parent topics. If parent topic is not accessible the title is just displayed without a link.
diffstat:
system/lib-topic.php | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 9d479db12ac9 -r e24fa62db1ea system/lib-topic.php
--- a/system/lib-topic.php Fri Jan 20 10:52:03 2012 -0500
+++ b/system/lib-topic.php Mon Jan 23 12:49:32 2012 -0500
@@ -1267,7 +1267,7 @@
*/
function TOPIC_breadcrumbs($type, $id)
{
- global $_CONF, $_TABLES, $LANG27;
+ global $_CONF, $_TABLES, $LANG27, $_TOPICS;
$breadcrumbs_output = '';
@@ -1337,7 +1337,14 @@
} else {
$url = $_CONF['site_url'] . '/index.php';
}
- if (is_array($url)) { // Do not have access to view page
+ // double check access (users may have access to a subtopic but not a parent topic, this shouldn't really happen though)
+ $topic_access = 0;
+ $topic_index = TOPIC_getIndex($value['id']);
+ if ($topic_index > 0 ) {
+ $topic_access = $_TOPICS[$topic_index]['access'];
+ }
+
+ if ($topic_access == 0) { // Do not have access to view page
$url = '';
$use_template = 'breadcrumb_nolink_t';
} else {
More information about the geeklog-cvs
mailing list