summaryrefslogtreecommitdiff
path: root/modules/story/story.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-06-22 19:41:30 +0000
committerDries Buytaert <dries@buytaert.net>2001-06-22 19:41:30 +0000
commitd565b6f34ad1923cd32a6b80ba31c0791782445f (patch)
treecc7fb94f031504be8709e742433d3469c626da9e /modules/story/story.module
parentb6820fe44a4c32af820cc502c3340af2f4ae88ae (diff)
downloadbrdo-d565b6f34ad1923cd32a6b80ba31c0791782445f.tar.gz
brdo-d565b6f34ad1923cd32a6b80ba31c0791782445f.tar.bz2
- Made the search result sort from new to old, instead of from old to new.
Diffstat (limited to 'modules/story/story.module')
-rw-r--r--modules/story/story.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/story/story.module b/modules/story/story.module
index 9773f2af4..ee5b8cecf 100644
--- a/modules/story/story.module
+++ b/modules/story/story.module
@@ -14,7 +14,7 @@ function story_status() {
function story_search($keys) {
global $status, $user;
- $result = db_query("SELECT n.*, s.* FROM story s LEFT JOIN node n ON n.nid = s.nid AND n.lid = s.lid WHERE n.status = '$status[posted]' AND (n.title LIKE '%$keys%' OR s.abstract LIKE '%$keys%' OR s.body LIKE '%$keys%') LIMIT 20");
+ $result = db_query("SELECT n.*, s.* FROM story s LEFT JOIN node n ON n.nid = s.nid AND n.lid = s.lid WHERE n.status = '$status[posted]' AND (n.title LIKE '%$keys%' OR s.abstract LIKE '%$keys%' OR s.body LIKE '%$keys%') ORDER BY n.timestamp DESC LIMIT 20");
while ($story = db_fetch_object($result)) {
$find[$i++] = array("title" => check_output($story->title), "link" => (user_access($user, "add and edit nodes") ? "admin.php?mod=node&type=story&op=edit&id=$story->nid" : "node.php?id=$story->nid"), "user" => $story->userid, "date" => $story->timestamp);
}