*/
static public $languagesWithVariants = [
'en',
+ 'crh',
'gan',
'iu',
'kk',
$req = $this->getURLVariant();
+ Hooks::run( 'GetLangPreferredVariant', [ &$req ] );
+
if ( $wgUser->isSafeToLoad() && $wgUser->isLoggedIn() && !$req ) {
$req = $this->getUserVariant();
} elseif ( !$req ) {
// We hit the end.
$elementPos = strlen( $text );
$element = '';
- } elseif( substr( $element, -1 ) === "\004" ) {
+ } elseif ( substr( $element, -1 ) === "\004" ) {
// This can sometimes happen if we have
// unclosed html tags (For example
// when converting a title attribute
$noScript = '<script.*?>.*?<\/script>(*SKIP)(*FAIL)';
$noStyle = '<style.*?>.*?<\/style>(*SKIP)(*FAIL)';
- // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
+ // phpcs:ignore Generic.Files.LineLength
$noHtml = '<(?:[^>=]*+(?>[^>=]*+=\s*+(?:"[^"]*"|\'[^\']*\'|[^\'">\s]*+))*+[^>=]*+>|.*+)(*SKIP)(*FAIL)';
- // @codingStandardsIgnoreEnd
while ( $startPos < $length && $continue ) {
$continue = preg_match(
// Only match -{ outside of html.