diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-09-16 14:05:10 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-09-16 14:05:10 +0000 |
commit | e2f249878eddb4d91e3bffa80ba5452691b5e43b (patch) | |
tree | b0b27a46d7c281d3dd4aae420de3f823b6650b7a /modules/poll.module | |
parent | 64a6fbc790f02a80b32682456a24a45afe8c50a5 (diff) | |
download | brdo-e2f249878eddb4d91e3bffa80ba5452691b5e43b.tar.gz brdo-e2f249878eddb4d91e3bffa80ba5452691b5e43b.tar.bz2 |
- improved the search system by making it context sensitive
Diffstat (limited to 'modules/poll.module')
-rw-r--r-- | modules/poll.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/poll.module b/modules/poll.module index 28cebb4ae..b2589941c 100644 --- a/modules/poll.module +++ b/modules/poll.module @@ -75,10 +75,10 @@ function poll_status() { } function poll_search($keys) { - global $status; + global $PHP_SELF, $status; $result = db_query("SELECT n.*, p.* FROM poll p LEFT JOIN node n ON n.nid = p.nid AND n.lid = p.lid WHERE n.status = '$status[posted]' AND (n.title LIKE '%$keys%') LIMIT 20"); while ($poll = db_fetch_object($result)) { - $find[$i++] = array("title" => check_output($poll->title), "link" => (user_access("administer nodes") ? "admin.php?mod=poll&op=edit&id=$poll->nid" : "node.php?id=$poll->nid"), "user" => $poll->name, "date" => $poll->timestamp); + $find[$i++] = array("title" => check_output($poll->title), "link" => ($PHP_SELF == "/admin.php" ? "admin.php?mod=poll&op=edit&id=$poll->nid" : "node.php?id=$poll->nid"), "user" => $poll->name, "date" => $poll->timestamp); } return $find; } |