# HG changeset patch # User Dan # Date 1195922614 18000 # Node ID ac7d3dedcc4476e39102d5b053b6a7e4cb30f315 # Parent e47e4be549adbce4e01d13300824c833bf5f69ee Fix wrong namespace for search results diff -r e47e4be549ad -r ac7d3dedcc44 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']), ); }