Commit c65cfcab authored by Kjartan's avatar Kjartan

- sort books by weight, then title in book_render().

parent 2afb0956
...@@ -504,7 +504,7 @@ function book_tree($parent = 0, $depth = 3) { ...@@ -504,7 +504,7 @@ function book_tree($parent = 0, $depth = 3) {
function book_render() { function book_render() {
global $theme; 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)) { while ($page = db_fetch_object($result)) {
// load the node: // load the node:
......
...@@ -504,7 +504,7 @@ function book_tree($parent = 0, $depth = 3) { ...@@ -504,7 +504,7 @@ function book_tree($parent = 0, $depth = 3) {
function book_render() { function book_render() {
global $theme; 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)) { while ($page = db_fetch_object($result)) {
// load the node: // load the node:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment