From 6b5e5d2c4a127a1cc29c1dd0e21d7f6c8934c072 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Mon, 15 Aug 2011 11:46:51 +0200 Subject: [PATCH] clarify icons function --- pim_search.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pim_search.php b/pim_search.php index 92a53f7..901264d 100644 --- a/pim_search.php +++ b/pim_search.php @@ -52,10 +52,11 @@ else $startingitem = 0; $image_path = "/devpim/pub/"; -$copy_img = ""; -$star_img = ""; -$alt_img = ""; -$bug_img = ""; +$copy_img = "\"copy"; +$star_img = "\"mark"; +// this could use some Javascript effect +$alt_img = "\"use"; +$bug_img = "\"mark"; if ($words == ""){ print "You need to make an actual search, use ?query=keyword
"; @@ -86,9 +87,14 @@ if ( !$res ) { // yet still always offer it as an option (since it's "costly") #var_dump($res); $IDs = array_keys($res["matches"]); + // note that $IDs = array_unique(array_keys($res["matches"])); does not solve the multiple page issue + // thus probably comes from a duplicate indexing print "

Query$bug_img

"; - - print "\"$words\" found ".$res["words"]["$words"]["hits"]." time(s) in ".$res["total_found"]." document(s):
"; + if (isset( $res["words"]["$words"]["hits"]) ) + $hits = $res["words"]["$words"]["hits"]." time(s) "; + else + $hits = ""; + print "\"$words\" found ".$hits." in ".$res["total_found"]." document(s):
"; print "