Commit c9feee50 authored by Kjartan's avatar Kjartan
Browse files

- added missing access check for links

parent 000ee5d1
......@@ -58,7 +58,7 @@ function page_load($node) {
}
function page_link($type) {
if ($type == "page") {
if ($type == "page" && user_access("access content")) {
$result = db_query("SELECT n.nid, p.link FROM page p LEFT JOIN node n ON p.nid = n.nid WHERE n.status = '1' AND p.link != '' ORDER BY p.link");
while ($page = db_fetch_object($result)) {
$links[] = l($page->link, array("id" => $page->nid));
......
......@@ -58,7 +58,7 @@ function page_load($node) {
}
function page_link($type) {
if ($type == "page") {
if ($type == "page" && user_access("access content")) {
$result = db_query("SELECT n.nid, p.link FROM page p LEFT JOIN node n ON p.nid = n.nid WHERE n.status = '1' AND p.link != '' ORDER BY p.link");
while ($page = db_fetch_object($result)) {
$links[] = l($page->link, array("id" => $page->nid));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment