summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-10-24 15:39:24 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-10-24 15:39:24 +0000
commitc65cfcabb51b186965422359769266ad7a536c4b (patch)
treef1da624cef109eecf540ed596a9730d4a90e8a0e
parent2afb09563d16d759e9900c5e678ab7631a238811 (diff)
downloadbrdo-c65cfcabb51b186965422359769266ad7a536c4b.tar.gz
brdo-c65cfcabb51b186965422359769266ad7a536c4b.tar.bz2
- sort books by weight, then title in book_render().
-rw-r--r--modules/book.module2
-rw-r--r--modules/book/book.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/book.module b/modules/book.module
index f8f5d274d..9768b650a 100644
--- a/modules/book.module
+++ b/modules/book.module
@@ -504,7 +504,7 @@ function book_tree($parent = 0, $depth = 3) {
function book_render() {
global $theme;
- $result = db_query("SELECT n.nid FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = 0 AND n.status = 1 AND (n.moderate = 0 OR n.revisions != '') ORDER BY b.weight");
+ $result = db_query("SELECT n.nid FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = 0 AND n.status = 1 AND (n.moderate = 0 OR n.revisions != '') ORDER BY b.weight, n.title");
while ($page = db_fetch_object($result)) {
// load the node:
diff --git a/modules/book/book.module b/modules/book/book.module
index f8f5d274d..9768b650a 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -504,7 +504,7 @@ function book_tree($parent = 0, $depth = 3) {
function book_render() {
global $theme;
- $result = db_query("SELECT n.nid FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = 0 AND n.status = 1 AND (n.moderate = 0 OR n.revisions != '') ORDER BY b.weight");
+ $result = db_query("SELECT n.nid FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = 0 AND n.status = 1 AND (n.moderate = 0 OR n.revisions != '') ORDER BY b.weight, n.title");
while ($page = db_fetch_object($result)) {
// load the node: