Commit d3de63ca authored by Dries's avatar Dries

- Fixed small bug in "search node" of node.module.

parent b86d6a2f
......@@ -208,7 +208,7 @@ function node_search() {
$output .= "<FORM ACTION=\"$REQUEST_URI\" METHOD=\"POST\">\n";
$output .= " <INPUT SIZE=\"50\" VALUE=\"". check_form($keys) ."\" NAME=\"keys\" TYPE=\"text\">\n";
$output .= " <SELECT NAME=\"module\">$options</SELECT>\n";
$output .= " <SELECT NAME=\"type\">$options</SELECT>\n";
$output .= " <INPUT TYPE=\"submit\" VALUE=\"Search\">\n";
$output .= "</FORM>\n";
......
......@@ -208,7 +208,7 @@ function node_search() {
$output .= "<FORM ACTION=\"$REQUEST_URI\" METHOD=\"POST\">\n";
$output .= " <INPUT SIZE=\"50\" VALUE=\"". check_form($keys) ."\" NAME=\"keys\" TYPE=\"text\">\n";
$output .= " <SELECT NAME=\"module\">$options</SELECT>\n";
$output .= " <SELECT NAME=\"type\">$options</SELECT>\n";
$output .= " <INPUT TYPE=\"submit\" VALUE=\"Search\">\n";
$output .= "</FORM>\n";
......
......@@ -16,7 +16,7 @@ function story_search($keys) {
global $status, $user;
$result = db_query("SELECT n.*, s.* FROM story s LEFT JOIN node n ON n.nid = s.nid AND n.lid = s.lid WHERE n.status = '$status[posted]' AND (n.title LIKE '%$keys%' OR s.abstract LIKE '%$keys%' OR s.body LIKE '%$keys%') LIMIT 20");
while ($story = db_fetch_object($result)) {
$find[$i++] = array("title" => check_output($story->title), "link" => (user_access($user, "story") ? "admin.php?mod=story&op=edit&id=$story->nid" : "node.php?id=$story->nid"), "user" => $story->userid, "date" => $story->timestamp);
$find[$i++] = array("title" => check_output($story->title), "link" => (user_access($user, "story") ? "admin.php?mod=node&type=story&op=edit&id=$story->nid" : "node.php?id=$story->nid"), "user" => $story->userid, "date" => $story->timestamp);
}
return $find;
}
......
......@@ -16,7 +16,7 @@ function story_search($keys) {
global $status, $user;
$result = db_query("SELECT n.*, s.* FROM story s LEFT JOIN node n ON n.nid = s.nid AND n.lid = s.lid WHERE n.status = '$status[posted]' AND (n.title LIKE '%$keys%' OR s.abstract LIKE '%$keys%' OR s.body LIKE '%$keys%') LIMIT 20");
while ($story = db_fetch_object($result)) {
$find[$i++] = array("title" => check_output($story->title), "link" => (user_access($user, "story") ? "admin.php?mod=story&op=edit&id=$story->nid" : "node.php?id=$story->nid"), "user" => $story->userid, "date" => $story->timestamp);
$find[$i++] = array("title" => check_output($story->title), "link" => (user_access($user, "story") ? "admin.php?mod=node&type=story&op=edit&id=$story->nid" : "node.php?id=$story->nid"), "user" => $story->userid, "date" => $story->timestamp);
}
return $find;
}
......
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