From ff2ae1855d20c7a4a4f4ccc8d93d32cc0abb0d58 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Tue, 25 Sep 2001 22:13:34 +0000 Subject: - added node_page() to list what index.php used to list. - made the front page of the system configurable. Now any _page() can be set as the default page. Default is node_page(). --- modules/node.module | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'modules/node.module') diff --git a/modules/node.module b/modules/node.module index c00522a8f..55fc07fc6 100644 --- a/modules/node.module +++ b/modules/node.module @@ -421,11 +421,24 @@ function node_feed() { } function node_page() { - global $op; + global $op, $theme; if ($op == "feed") { node_feed(); } + else { + $theme->header(); + if (user_access("access content")) { + $result = db_query("SELECT nid, type FROM node WHERE ". ($meta ? "attributes LIKE '%". check_input($meta) ."%' AND " : "") ." promote = '1' AND status = '". node_status("posted") ."' AND timestamp <= '". ($date > 0 ? check_input($date) : time()) ."' ORDER BY timestamp DESC LIMIT ". ($user->nodes ? $user->nodes : variable_get(default_nodes_main, 10))); + while ($node = db_fetch_object($result)) { + node_view(node_get_object(array("nid" => $node->nid, "type" => $node->type)), 1); + } + } + else { + $theme->box(t("Access denied"), message_access()); + } + $theme->footer(); + } } ?> -- cgit v1.2.3