savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers-public] (no subject)


From: nick alvaro
Subject: [Savannah-hackers-public] (no subject)
Date: Thu, 1 May 2008 21:47:33 -0700 (PDT)

I have a feeling you prefer not to accept attachments, but I sent one anyways 
along with the same text in the e-mail if that helps.

----PATCH START----

diff --git a/home/nick/general.php 
b/home/nick/savane-cleanup/frontend/php/include/search/general.php
index 3cbb2ec..9b1884f 100644
--- a/home/nick/general.php
+++ b/home/nick/savane-cleanup/frontend/php/include/search/general.php
@@ -233,7 +233,7 @@ function search_box ($searched_words='', $only_artifact=0, 
$size=15, $class="")

function search_send_header ()
{
-  global $HTML, $words,    $type_of_search, $only_group_id;
+  global $HTML,$words,$type_of_search,$only_group_id;

   if ($type_of_search == "soft" || $type_of_search == "people")
     {
@@ -255,49 +255,32 @@ function search_send_header ()
   print html_show_boxoptions($title, search_box($words, '', 45));

   # Print the result
-
+  print '<h3>';
   if ($words && $type_of_search)
     {
       # Print real words describing the type of search
       if ($type_of_search == "soft")
-    { $type_of_search_real = _("Project/Group"); 
-     search_exact($words);
-     print '<h3>';
-    }
+    { $type_of_search_real = _("Project/Group"); }
       else if ($type_of_search == "support")
-    { $type_of_search_real = _("Support");
-     print '<h3>';
-     }
+    { $type_of_search_real = _("Support"); }
       else if ($type_of_search == "bugs")
-    { $type_of_search_real = _("Bugs"); 
-     print '<h3>';      
-    }
+    { $type_of_search_real = _("Bugs"); }
       else if ($type_of_search == "task")
-    { $type_of_search_real = _("Task"); 
-      print '<h3>';
-    }
+    { $type_of_search_real = _("Task"); }
       else if ($type_of_search == "patch")
-    { $type_of_search_real = _("Patch"); 
-      print '<h3>';
-    }
+    { $type_of_search_real = _("Patch"); }
       else if ($type_of_search == "cookbook")
-    { $type_of_search_real = _("Cookbook"); 
-      print '<h3>';
-    }
+    { $type_of_search_real = _("Cookbook"); }
       else if ($type_of_search == "people")
-    { $type_of_search_real = _("People"); 
-      print '<h3>';
-    }
+    { $type_of_search_real = _("People"); }

       if (!$only_group_id)
    {
      printf(_("Search results for %s (in %s):"), 
'<strong>'.htmlspecialchars($words).'</strong>', $type_of_search_real);
-
    }
       else
    {
      printf(_("Search results for %s (in %s, for the Group %s):"), 
'<strong>'.htmlspecialchars($words).'</strong>', $type_of_search_real, 
group_getname($only_group_id));
-
    }
     }
else
@@ -413,7 +396,6 @@ function search_run ($keywords, $type_of_search="soft", 
$return_error_messages=1
    {
      $sql .= "AND type=? ";
      $sql_params[] = $type;
-      
    }

       list($kw_sql, $kw_sql_params) = search_keywords_in_fields(
@@ -480,45 +462,3 @@ function search_run ($keywords, $type_of_search="soft", 
$return_error_messages=1
   $sql_params[] = $max_rows + 1;
   return db_execute($sql, $sql_params);
}
-
-function search_exact ($keywords, $return_error_messages=1)
-{
-
-    // Find the characters that maybe for a non-precise search. No need to 
continue if it they are present.
-    $non_precise_key1 = strpos($keywords, '*' );
-    $non_precise_key2 = strpos($keywords, '%' );
-
-    if ($non_precise_key1 === false && $non_precise_key2 === false)
-       {    
-       $sql = "SELECT group_name,unix_group_name,short_description,name
-                    FROM groups,group_type
-             WHERE type=type_id
-             AND group_name IN('$keywords')
-             AND status='A'
-             AND is_public='1'";
-
-       $result = db_execute($sql);
-       $num_rows = db_numrows($result);
-
-         if ($num_rows == 1)
-              {
-              $title_arr = array();
-              $title_arr[] = _("Project");
-              $title_arr[] = _("Description");
-              $title_arr[] = _("Type");                       
-    
-              print "<h3>Unique project search result for $keywords:</h3>";
-                
-              print html_build_list_table_top($title_arr);
-                
-              print "\n";
-                
-              $row = db_fetch_array($result);
-
-              print "<tr><td><a 
href=\"../projects/${row['unix_group_name']}\">${row['group_name']}</a></td> \n
-              <td>${row['short_description']}</td> \n
-              <td>${row['name']}</td></tr> \n
-          
-              </table>";
-              }
-       }
-}


----END PATCH---------

> Sure, but this pretty off-topic, don't you think? :)

Now, I don't have to drop my e-mail hitch hikers, do I?


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Attachment: general.php.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]