Changeset 1408 in ExiteCMS for branches/PLi-Fusion/search.php
- Timestamp:
- 05/15/08 22:25:54 (4 years ago)
- File:
-
- 1 edited
-
branches/PLi-Fusion/search.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/PLi-Fusion/search.php
r1124 r1408 46 46 $variables['rowstart'] = $rowstart; 47 47 48 // do we have a localized menu? If so, select only the current locale 49 switch ($settings['sitelinks_localisation']) { 50 case "none": 51 $where = ""; 52 break; 53 case "single": 54 $where = ""; 55 break; 56 case "multiple": 57 if (isset($link_locale)) { 58 $result = dbquery("SELECT * FROM ".$db_prefix."locale WHERE locale_code = '".stripinput($link_locale)."' AND locale_active = '1' LIMIT 1"); 59 if (!dbrows($result)) unset($link_locale); 60 } 61 if (!isset($link_locale)) $link_locale = $settings['locale_code']; 62 $variables['link_locale'] = $link_locale; 63 $where = "AND link_locale = '".$link_locale."' "; 64 break; 65 } 66 48 67 // get the available options from the database 49 $result = dbquery("SELECT * FROM ".$db_prefix."site_links WHERE link_position<='2' ORDER BY link_order");68 $result = dbquery("SELECT * FROM ".$db_prefix."site_links WHERE link_position<='2' ".$where."ORDER BY link_order"); 50 69 $variables['links'] = array(); 51 70 if (dbrows($result) != 0) { … … 91 110 case "f": // forums 92 111 $result = dbquery( 93 "SELECT tp.*, tf.*, tu.user_id,user_name, 94 MATCH( post_subject, post_message) AGAINST ('$stext' IN BOOLEAN MODE) AS score112 "SELECT tp.*, tf.*, tu.user_id,user_name, fa.attach_id, 113 MATCH(tp.post_subject, tp.post_message, fa.attach_name, fa.attach_realname, fa.attach_comment) AGAINST ('$stext' IN BOOLEAN MODE) AS score 95 114 FROM ".$db_prefix."posts tp 96 115 INNER JOIN ".$db_prefix."forums tf USING(forum_id) 97 116 INNER JOIN ".$db_prefix."users tu ON tp.post_author=tu.user_id 98 WHERE ".groupaccess('forum_access')." AND MATCH(post_subject, post_message) AGAINST ('$stext' IN BOOLEAN MODE) 117 LEFT JOIN ".$db_prefix."forum_attachments fa ON tp.post_id=fa.post_id 118 WHERE ".groupaccess('forum_access')." AND MATCH(tp.post_subject, tp.post_message, fa.attach_name, fa.attach_realname, fa.attach_comment) AGAINST ('$stext' IN BOOLEAN MODE) 99 119 ORDER BY score DESC, post_datestamp DESC" 100 120 );
Note: See TracChangeset
for help on using the changeset viewer.
