Fix wrong namespace for search results
authorDan
Sat, 24 Nov 2007 11:43:34 -0500
changeset 15 ac7d3dedcc44
parent 14 e47e4be549ad
child 16 36dd990c0c25
child 18 c1c398349651
Fix wrong namespace for search results
plugins/gallery/search.php
--- a/plugins/gallery/search.php	Sat Nov 24 11:41:40 2007 -0500
+++ b/plugins/gallery/search.php	Sat Nov 24 11:43:34 2007 -0500
@@ -28,7 +28,7 @@
 function gal_searcher($q, $offset)
 {
   global $db, $session, $paths, $template, $plugins; // Common objects
-  if ( defined('SNAPR_SEARCH_USING_NEW_API') )
+  if ( defined('SNAPR_SEARCH_USING_NEW_API') || version_compare(enano_version(true), '1.0.2', '>=') )
     return false;
   
   $fulltext_col = 'MATCH(img_title, img_desc) AGAINST (\'' . $db->escape($q) . '\' IN BOOLEAN MODE)';
@@ -128,7 +128,7 @@
   {
     do
     {
-      $idstring = 'ns=Image;pid=' . $row['img_id'];
+      $idstring = 'ns=Gallery;pid=' . $row['img_id'];
       foreach ( $word_list as $term )
       {
         if ( $case_sensitive )
@@ -173,7 +173,7 @@
           'score' => $scores[$idstring],
           'page_note' => '[Gallery image]',
           'page_id' => strval($row['img_id']),
-          'namespace' => 'Image',
+          'namespace' => 'Gallery',
           'page_length' => strlen($row['img_desc']),
         );
       }