Ticket #2386: 2386_2.patch
File 2386_2.patch, 1.1 KB (added by , 16 years ago) |
---|
-
FCKeditorSajax.body.php
81 81 } 82 82 83 83 function wfSajaxSearchArticleFCKeditor( $term ) { 84 global $wgContLang, $wgOut ;84 global $wgContLang, $wgOut,$wgExtraNamespaces; 85 85 $limit = 10; 86 86 $ns = NS_MAIN; 87 87 … … 97 97 $term = substr($term, 10); 98 98 $prefix = ":Category:"; 99 99 } 100 else if (strpos($term, "Media:") === 0) { 101 $ns = NS_IMAGE; 102 $term = substr($term, 6); 103 $prefix = "Media:"; 104 } 105 else if (strpos($term, ":Image:") === 0) { 106 $ns = NS_IMAGE; 107 $term = substr($term, 7); 108 $prefix = ":Image:"; 109 } 110 else if ( strpos($term,":") && is_array($wgExtraNamespaces )) { 111 $pos = strpos($term,":"); 112 $find_ns = array_search(substr($term,0,$pos),$wgExtraNamespaces); 113 if ($find_ns) { 114 $ns = $find_ns; 115 $prefix = substr($term,0,$pos+1); 116 $term = substr($term,$pos+1); 117 } 118 } 100 119 101 120 $term1 = str_replace( ' ', '_', $wgContLang->ucfirst( $term ) ); 102 121 $term2 = str_replace( ' ', '_', $wgContLang->lc( $term ) );