Ticket #2370: 2370_2.patch

File 2370_2.patch, 1.9 KB (added by Artur Formella, 16 years ago)
  • FCKeditorSajax.body.php

     
    5656        $term1 = str_replace( ' ', '_', $wgContLang->ucfirst( $term ) );
    5757        $term2 = str_replace( ' ', '_', $wgContLang->lc( $term ) );
    5858        $term3 = str_replace( ' ', '_', $wgContLang->uc( $term ) );
     59        $term4 = str_replace( ' ', '_', $wgContLang->ucfirst( $term2 ) );
    5960        $term = $term1;
    6061
    6162        if ( strlen( str_replace( '_', '', $term ) )<3 )
     
    6465        $db = wfGetDB( DB_SLAVE );
    6566        $res = $db->select( 'page', 'page_title',
    6667        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 ) ."%') " ),
    6872        "wfSajaxSearch",
    6973        array( 'LIMIT' => $limit+1 )
    7074        );
     
    101105        $term1 = str_replace( ' ', '_', $wgContLang->ucfirst( $term ) );
    102106        $term2 = str_replace( ' ', '_', $wgContLang->lc( $term ) );
    103107        $term3 = str_replace( ' ', '_', $wgContLang->uc( $term ) );
     108        $term4 = str_replace( ' ', '_', $wgContLang->ucfirst( $term2 ) );
    104109        $term = $term1;
    105110
    106111        if ( strlen( str_replace( '_', '', $term ) )<3 ) {
     
    110115        $db = wfGetDB( DB_SLAVE );
    111116        $res = $db->select( 'page', 'page_title',
    112117        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 ) ."%') " ),
    114122        "wfSajaxSearch",
    115123        array( 'LIMIT' => $limit+1 )
    116124        );
     
    171179}
    172180
    173181
     182
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy