diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-09-27 18:30:36 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-09-27 18:30:36 +0000 |
commit | 6cde632962a461d2dc2acef0917b592823e123f8 (patch) | |
tree | 6bcc7b5ab32acff8c58b04afe829f6cc4325ed8f /modules/book.module | |
parent | f9a84cd216797f6a38eb3be5db3b1dff6670baf6 (diff) | |
download | brdo-6cde632962a461d2dc2acef0917b592823e123f8.tar.gz brdo-6cde632962a461d2dc2acef0917b592823e123f8.tar.bz2 |
- book.module: fixed "/admin.php" bug reported by Gerhard.
- search.module: made the search categories translatable.
Diffstat (limited to 'modules/book.module')
-rw-r--r-- | modules/book.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/book.module b/modules/book.module index 58b14a3f2..bbfde7677 100644 --- a/modules/book.module +++ b/modules/book.module @@ -85,7 +85,7 @@ function book_search($keys) { global $PHP_SELF, $status; $result = db_query("SELECT n.*, u.name FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid LEFT JOIN user u ON n.author = u.uid WHERE n.type = 'book' AND n.status = '$status[posted]' AND (n.title LIKE '%". check_input($keys) ."%' OR b.body LIKE '%". check_input($keys) ."%') ORDER BY n.timestamp DESC LIMIT 20"); while ($node = db_fetch_object($result)) { - $find[$i++] = array("title" => check_output($node->title), "link" => ($PHP_SELF == "/admin.php" ? "admin.php?mod=node&type=book&op=edit&id=$node->nid" : "node.php?id=$node->nid"), "user" => $node->name, "date" => $node->timestamp); + $find[$i++] = array("title" => check_output($node->title), "link" => (strstr($PHP_SELF, "admin.php") ? "admin.php?mod=node&type=book&op=edit&id=$node->nid" : "node.php?id=$node->nid"), "user" => $node->name, "date" => $node->timestamp); } return $find; } @@ -213,7 +213,7 @@ function book_tree($parent = "", $depth = 0) { // render output: while ($node = db_fetch_object($result)) { - $output .= "<LI><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A>". ($PHP_SELF == "/admin.php" ? " <SMALL>(weight: $node->weight/$node->parent, status: $node->status) (<A HREF=\"admin.php?mod=node&type=book&op=edit&id=$node->nid\">edit</A>)</SMALL>" : "") ."</LI>\n"; + $output .= "<LI><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A>". (strstr($PHP_SELF, "admin.php") ? " <SMALL>(weight: $node->weight/$node->parent, status: $node->status) (<A HREF=\"admin.php?mod=node&type=book&op=edit&id=$node->nid\">edit</A>)</SMALL>" : "") ."</LI>\n"; $output .= book_tree($node->nid, $depth + 1); } $output = "<UL>$output</UL>"; |