Index: branches/SerbianVariants/phase3/languages/LanguageConverter.php |
— | — | @@ -98,10 +98,9 @@ |
99 | 99 | } |
100 | 100 | |
101 | 101 | // check the syntax /code/ArticleTitle |
102 | | - $script = $_SERVER['SCRIPT_NAME']; |
103 | | - $variants = implode('|',$this->mVariants); |
104 | | - if(preg_match("/($variants)$/",$script,$matches)){ |
105 | | - $this->mPreferredVariant = $matches[1]; |
| 102 | + $scriptBase = basename( $_SERVER['SCRIPT_NAME'] ); |
| 103 | + if(in_array($scriptBase,$this->mVariants)){ |
| 104 | + $this->mPreferredVariant = $scriptBase; |
106 | 105 | return $this->mPreferredVariant; |
107 | 106 | } |
108 | 107 | |