$lc = SearchEngine::legalSearchChars() . '&#;';
$t = $wgContLang->stripForSearch( $title );
$t = preg_replace( "/[^{$lc}]+/", ' ', $t );
- $t = strtolower( $t );
+ $t = $wgContLang->lc( $t );
# Handle 's, s'
$t = preg_replace( "/([{$lc}]+)'s( |$)/", "\\1 \\1's ", $t );
*/
function getInterwikiLink( $key ) {
global $wgMemc, $wgInterwikiExpiry;
- global $wgInterwikiCache;
+ global $wgInterwikiCache, $wgContLang;
$fname = 'Title::getInterwikiLink';
- $key = strtolower( $key );
+ $key = $wgContLang->lc( $key );
$k = wfMemcKey( 'interwiki', $key );
if( array_key_exists( $k, Title::$interwikiCache ) ) {
do {
if ( preg_match( "/^(.+?)_*:_*(.*)$/S", $t, $m ) ) {
$p = $m[1];
- $lowerNs = strtolower( $p );
+ $lowerNs = $wgContLang->lc( $p );
if ( $ns = Namespace::getCanonicalIndex( $lowerNs ) ) {
# Canonical namespace
$t = $m[2];
# Interwiki link
$t = $m[2];
- $this->mInterwiki = strtolower( $p );
+ $this->mInterwiki = $wgContLang->lc( $p );
# Redundant interwiki prefix to the local wiki
if ( 0 == strcasecmp( $this->mInterwiki, $wgLocalInterwiki ) ) {
* @return string
*/
function getNamespaceKey() {
+ global $wgContLang;
switch ($this->getNamespace()) {
case NS_MAIN:
case NS_TALK:
case NS_CATEGORY_TALK:
return 'nstab-category';
default:
- return 'nstab-' . strtolower( $this->getSubjectNsText() );
+ return 'nstab-' . $wgContLang->lc( $this->getSubjectNsText() );
}
}
}