plugins/gallery/search.php
changeset 15 ac7d3dedcc44
parent 13 f6ca7cead82c
child 16 36dd990c0c25
--- 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']),
         );
       }