[geeklog-cvs] geeklog: Fix #0001090: Forever loop on non-existent link's category
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Wed Mar 17 16:28:25 EDT 2010
changeset 7806:4fbe29eb965c
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/4fbe29eb965c
user: Akeda Bagus <admin at gedex.web.id>
date: Wed Mar 17 03:28:40 2010 +0700
description:
Fix #0001090: Forever loop on non-existent link's category
diffstat:
public_html/links/index.php | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (28 lines):
diff -r ce2b99eeb8ec -r 4fbe29eb965c public_html/links/index.php
--- a/public_html/links/index.php Tue Mar 16 15:19:24 2010 -0400
+++ b/public_html/links/index.php Wed Mar 17 03:28:40 2010 +0700
@@ -112,7 +112,7 @@
}
}
- // Check has access to this category
+ // Check has access and existent to this category
if ($cid != $_LI_CONF['root']) {
$result = DB_query("SELECT owner_id,group_id,perm_owner,perm_group,perm_members,perm_anon FROM {$_TABLES['linkcategories']} WHERE cid='{$cat}'");
$A = DB_fetchArray($result);
@@ -123,6 +123,15 @@
COM_output($display);
exit;
}
+
+ // check existent
+ if ( !isset($A['owner_id']) ) {
+ $display .= COM_siteHeader ('menu', $page_title);
+ $display .= COM_showMessage (16, 'links');
+ $display .= COM_siteFooter ();
+ COM_output($display);
+ exit;
+ }
}
$display .= COM_siteHeader ('menu', $page_title);
More information about the geeklog-cvs
mailing list