Ticket #2370: 2370_2.patch
File 2370_2.patch, 1.9 KB (added by , 15 years ago) |
---|
-
FCKeditorSajax.body.php
56 56 $term1 = str_replace( ' ', '_', $wgContLang->ucfirst( $term ) ); 57 57 $term2 = str_replace( ' ', '_', $wgContLang->lc( $term ) ); 58 58 $term3 = str_replace( ' ', '_', $wgContLang->uc( $term ) ); 59 $term4 = str_replace( ' ', '_', $wgContLang->ucfirst( $term2 ) ); 59 60 $term = $term1; 60 61 61 62 if ( strlen( str_replace( '_', '', $term ) )<3 ) … … 64 65 $db = wfGetDB( DB_SLAVE ); 65 66 $res = $db->select( 'page', 'page_title', 66 67 array( 'page_namespace' => NS_IMAGE, 67 "LOWER(page_title) LIKE '%". $db->strencode( $term2 ) ."%'" ), 68 "page_title LIKE '%". $db->strencode( $term1 ) ."%'". 69 "OR (page_title LIKE '%". $db->strencode( $term2 ) ."%') ". 70 "OR (page_title LIKE '%". $db->strencode( $term3 ) ."%') ". 71 "OR (page_title LIKE '%". $db->strencode( $term4 ) ."%') " ), 68 72 "wfSajaxSearch", 69 73 array( 'LIMIT' => $limit+1 ) 70 74 ); … … 101 105 $term1 = str_replace( ' ', '_', $wgContLang->ucfirst( $term ) ); 102 106 $term2 = str_replace( ' ', '_', $wgContLang->lc( $term ) ); 103 107 $term3 = str_replace( ' ', '_', $wgContLang->uc( $term ) ); 108 $term4 = str_replace( ' ', '_', $wgContLang->ucfirst( $term2 ) ); 104 109 $term = $term1; 105 110 106 111 if ( strlen( str_replace( '_', '', $term ) )<3 ) { … … 110 115 $db = wfGetDB( DB_SLAVE ); 111 116 $res = $db->select( 'page', 'page_title', 112 117 array( 'page_namespace' => $ns, 113 "LOWER(page_title) LIKE '%". $db->strencode( $term2 ) ."%'" ), 118 "page_title LIKE '%". $db->strencode( $term1 ) ."%' ". 119 "OR (page_title LIKE '%". $db->strencode( $term2 ) ."%') ". 120 "OR (page_title LIKE '%". $db->strencode( $term3 ) ."%') ". 121 "OR (page_title LIKE '%". $db->strencode( $term4 ) ."%') " ), 114 122 "wfSajaxSearch", 115 123 array( 'LIMIT' => $limit+1 ) 116 124 ); … … 171 179 } 172 180 173 181 182