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 | |
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.
-rw-r--r-- | modules/book.module | 4 | ||||
-rw-r--r-- | modules/book/book.module | 4 | ||||
-rw-r--r-- | modules/search.module | 3 | ||||
-rw-r--r-- | modules/search/search.module | 3 |
4 files changed, 6 insertions, 8 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>"; diff --git a/modules/book/book.module b/modules/book/book.module index 58b14a3f2..bbfde7677 100644 --- a/modules/book/book.module +++ b/modules/book/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>"; diff --git a/modules/search.module b/modules/search.module index afe827b2e..beb30565e 100644 --- a/modules/search.module +++ b/modules/search.module @@ -33,7 +33,6 @@ function search_page() { $type = check_input($type); $keys = check_input($keys); - /* ** Construct the search form: */ @@ -45,7 +44,7 @@ function search_page() { foreach (module_list() as $name) { if (module_hook($name, "search")) { - $form .= "<input type=\"checkbox\" name=\"edit[type][$name]\" ". ($edit["type"][$name] ? " checked=\"checked\"" : "") ."/> $name "; + $form .= " <input type=\"checkbox\" name=\"edit[type][$name]\" ". ($edit["type"][$name] ? " checked=\"checked\"" : "") ."/> ". t($name); } } diff --git a/modules/search/search.module b/modules/search/search.module index afe827b2e..beb30565e 100644 --- a/modules/search/search.module +++ b/modules/search/search.module @@ -33,7 +33,6 @@ function search_page() { $type = check_input($type); $keys = check_input($keys); - /* ** Construct the search form: */ @@ -45,7 +44,7 @@ function search_page() { foreach (module_list() as $name) { if (module_hook($name, "search")) { - $form .= "<input type=\"checkbox\" name=\"edit[type][$name]\" ". ($edit["type"][$name] ? " checked=\"checked\"" : "") ."/> $name "; + $form .= " <input type=\"checkbox\" name=\"edit[type][$name]\" ". ($edit["type"][$name] ? " checked=\"checked\"" : "") ."/> ". t($name); } } |