summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/book.module4
-rw-r--r--modules/book/book.module4
-rw-r--r--modules/search.module3
-rw-r--r--modules/search/search.module3
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);
}
}