Quick fix for LanguageNameIndexer
A better fix would be to use JSON directly from language-data. Bug: T279971 Change-Id: Iaaf936c4ba46069df2a4855056e613d62f8d7118
This commit is contained in:
committed by
jenkins-bot
parent
1f64589ae7
commit
97dffe3a9b
@@ -145,7 +145,7 @@ class LanguageNameIndexer extends Maintenance {
|
|||||||
private function getLanguageData() {
|
private function getLanguageData() {
|
||||||
$file = __DIR__ . '/../lib/jquery.uls/src/jquery.uls.data.js';
|
$file = __DIR__ . '/../lib/jquery.uls/src/jquery.uls.data.js';
|
||||||
$contents = file_get_contents( $file );
|
$contents = file_get_contents( $file );
|
||||||
if ( !preg_match( '/.*\$\.uls\.data = (.*?)} \( jQuery \)/s', $contents, $matches ) ) {
|
if ( !preg_match( '/.*\$\.uls\.data\s*=\s*(.*?)\s*}\s*\(\s*jQuery\s*\)/s', $contents, $matches ) ) {
|
||||||
throw new LogicException( 'Syntax error in jquery.uls.data.js?' );
|
throw new LogicException( 'Syntax error in jquery.uls.data.js?' );
|
||||||
}
|
}
|
||||||
$json = $matches[ 1 ];
|
$json = $matches[ 1 ];
|
||||||
|
|||||||
Reference in New Issue
Block a user