[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: dot.kde.org/static/cgi
From: Navindra Umanee <navindra () cs ! mcgill ! ca>
Date: 2005-06-20 23:55:53
Message-ID: 1119311753.348982.14213.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 427551 by navindra:
handle general searches as well
M +11 -4 google.cgi
--- trunk/dot.kde.org/static/cgi/google.cgi #427550:427551
@@ -15,14 +15,21 @@
$SAFE = 3
+if (!cgi['body'].empty?)
+ text = "#{cgi['body']}"
+end
+
if (!cgi['subject'].empty?)
- exact_phrase = "Articles+on+#{cgi['subject']}"
-elsif (!cgi['author'].empty?)
- exact_phrase = "Also+by+#{cgi['author']}"
+ exact_phrase = "%22Articles+on+#{cgi['subject']}%22"
end
-google = "http://www.google.com/search?num=#{num}&as_sitesearch=dot.kde.org&as_epq=#{exact_phrase}&as_oq=#{must_have}&as_eq=#{must_not_have}"
+if (!cgi['author'].empty?)
+ exact_phrase += "+" if (!exact_phrase.empty?)
+ exact_phrase += "%22Also+by+#{cgi['author']}%22"
+end
+google = "http://www.google.com/search?num=#{num}&as_sitesearch=dot.kde.org&as_epq=#{exact_phrase}&as_oq=#{must_have}&as_eq=#{must_not_have}&as_q=#{text}"
+
puts "Location: #{google}"
puts "Content-type: text/html"
puts ""
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic