- added missing access check for links

4.0.x
Kjartan Mannes 2002-05-29 17:17:09 +00:00
parent 000ee5d162
commit c9feee50ce
2 changed files with 2 additions and 2 deletions

View File

@ -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));

View File

@ -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));