diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-08-28 09:04:40 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2001-08-28 09:04:40 +0000 |
commit | 70864b57eb1c4df999af51f1ee34fc27eed6147a (patch) | |
tree | dd8c185e37d4448910fdf7c158d2c41eca052a0d | |
parent | b0691596ba04436294f697d6e32d185808dac9cd (diff) | |
download | brdo-70864b57eb1c4df999af51f1ee34fc27eed6147a.tar.gz brdo-70864b57eb1c4df999af51f1ee34fc27eed6147a.tar.bz2 |
book.module
- just a minor update to sort books of the same weight by title.
-rw-r--r-- | modules/book.module | 2 | ||||
-rw-r--r-- | modules/book/book.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/book.module b/modules/book.module index 52260c9cf..8b70a166a 100644 --- a/modules/book.module +++ b/modules/book.module @@ -209,7 +209,7 @@ function book_tree($parent = "", $depth = 0) { if ($depth < 3 || strstr($PHP_SELF,"admin.php")) { // select all child nodes: - $result = db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.type = 'book' AND n.status = '$status[posted]' AND ". book_parent_query($parent) ." ORDER BY b.weight"); + $result = db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.type = 'book' AND n.status = '$status[posted]' AND ". book_parent_query($parent) ." ORDER BY b.weight, n.title"); // render output: while ($node = db_fetch_object($result)) { diff --git a/modules/book/book.module b/modules/book/book.module index 52260c9cf..8b70a166a 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -209,7 +209,7 @@ function book_tree($parent = "", $depth = 0) { if ($depth < 3 || strstr($PHP_SELF,"admin.php")) { // select all child nodes: - $result = db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.type = 'book' AND n.status = '$status[posted]' AND ". book_parent_query($parent) ." ORDER BY b.weight"); + $result = db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.type = 'book' AND n.status = '$status[posted]' AND ". book_parent_query($parent) ." ORDER BY b.weight, n.title"); // render output: while ($node = db_fetch_object($result)) { |