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/story.module | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'modules/story.module') diff --git a/modules/story.module b/modules/story.module index 0a90490b6..852ed7053 100644 --- a/modules/story.module +++ b/modules/story.module @@ -201,18 +201,10 @@ function story_block() { function story_query($type = "") { global $status; - $queries = array(0 => array("active stories", "WHERE n.type = 'story' ORDER BY n.timestamp DESC"), 1 => array("posted stories", "WHERE n.type = 'story' AND n.status = '$status[posted]' ORDER BY n.timestamp DESC"), 2 => array("queued stories", "WHERE n.type = 'story' AND n.status = '$status[queued]' ORDER BY n.timestamp DESC"), 3 => array("dumped stories", "WHERE n.type = 'story' AND n.status = '$status[dumped]' ORDER BY n.timestamp DESC")); + $queries = array(array("recent stories", "WHERE n.type = 'story' ORDER BY n.timestamp DESC"), array("posted stories", "WHERE n.type = 'story' AND n.status = '$status[posted]' ORDER BY n.timestamp DESC"), array("queued stories", "WHERE n.type = 'story' AND n.status = '$status[queued]' ORDER BY n.timestamp DESC"), array("dumped stories", "WHERE n.type = 'story' AND n.status = '$status[dumped]' ORDER BY n.timestamp DESC")); return ($queries[$type] ? $queries[$type] : $queries); } -function story_listing() { - foreach (story_query() as $key=>$array) { - $output .= "
  • $array[0]
  • \n"; - } - return "
      $output
    \n"; -} - - function story_overview($query = array()) { return node_overview($query); } @@ -239,7 +231,7 @@ function story_admin() { story_help(); break; case "listing": - print story_listing(); + print node_listing(story_query()); break; case "search": print search_form($keys); -- cgit v1.2.3