From 4711869f52897077b52f76b54a74982de3ff0e9b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 11 Apr 2001 19:44:24 +0000 Subject: - fixed a small SQL bug in page.module - slightly improved story.module, node.module and book.module - made the "default theme" a setting from the setting page - polished a bit on the export function: we can now export the book or parts thereof through the following url: 1. http://drop.org/export/book/ (full book) 2. http://drop.org/export/book/nid (where nid is the node id to start with) The export routine demonstrates how it can be done yet the output is too basic and can only improve over time. --- modules/node.module | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'modules/node.module') diff --git a/modules/node.module b/modules/node.module index cbb0d5013..4c12ba5a7 100644 --- a/modules/node.module +++ b/modules/node.module @@ -11,7 +11,7 @@ function node_overview($query = array()) { $output .= "\n"; $output .= " \n"; while ($node = db_fetch_object($result)) { - $output .= " " : "view node") ."" : "edit node") ."" : "edit $node->type") ."\n"; + $output .= " " : "view node") ."" : "edit node") ."" : "edit $node->type") ."\n"; } $output .= "
titletypestatusauthordateoperations
nid\">". check_output($node->title) ."$node->type". $rstatus[$node->status] ."". format_username($node->userid) ."". format_date($node->timestamp) ."". (user_access($user, "node") ? "nid\">view node". (user_access($user, "node") ? "nid\">edit node". (user_access($user, $node->type) ? "type&op=edit&id=$node->nid\">edit $node->type
nid\">". check_output($node->title) ."$node->type". $rstatus[$node->status] ."". format_username($node->userid) ."". format_date($node->timestamp, "small") ."". (user_access($user, "node") ? "nid\">view node". (user_access($user, "node") ? "nid\">edit node". (user_access($user, $node->type) ? "type&op=edit&id=$node->nid\">edit $node->type
\n"; @@ -63,13 +63,14 @@ function node_delete($id) { function node_query($type = "") { global $status; - $queries = array(0 => array("active nodes", "ORDER BY n.timestamp DESC"), 1 => array("posted nodes", "WHERE n.status = '$status[posted]' ORDER BY n.timestamp DESC"), 2 => array("queued nodes", "WHERE n.status = '$status[queued]' ORDER BY n.timestamp DESC"), 3 => array("dumped nodes", "WHERE n.status = '$status[dumped]' ORDER BY n.timestamp DESC")); + $queries = array(array("recent nodes", "ORDER BY n.timestamp DESC"), array("posted nodes", "WHERE n.status = '$status[posted]' ORDER BY n.timestamp DESC"), array("queued nodes", "WHERE n.status = '$status[queued]' ORDER BY n.timestamp DESC"), array("dumped nodes", "WHERE n.status = '$status[dumped]' ORDER BY n.timestamp DESC")); return ($queries[$type] ? $queries[$type] : $queries); } -function node_listing() { - foreach (node_query() as $key=>$array) { - $output .= "
  • $array[0]
  • \n"; +function node_listing($queries) { + global $mod; + foreach ($queries as $key=>$array) { + $output .= "
  • $array[0]
  • \n"; } return "
      $output
    \n"; } @@ -92,7 +93,7 @@ function node_admin() { print node_overview(); break; case "listing": - print node_listing(); + print node_listing(node_query()); break; case "Save node": print status(node_save($edit)); -- cgit v1.2.3