Paladox has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/185209

Change subject: Convert to globals
......................................................................

Convert to globals

* There is a coposer.json file but it carnt be used if none of the settings are 
using globals.

Change-Id: Ie881dcf794e5ae7d1cc72741e61b10e250cb61d1
---
M MobileFrontend.php
M includes/config/Wikidata.php
2 files changed, 99 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/09/185209/1

diff --git a/MobileFrontend.php b/MobileFrontend.php
index b5fc4a7..9e44392 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -21,7 +21,7 @@
 }
 
 // Too many people are trying to use master MF with stable MediaWiki releases
-if ( version_compare( $wgVersion, '1.25c', '<' ) ) {
+if ( version_compare( $GLOBALS['wgVersion'], '1.25c', '<' ) ) {
        echo "This version of MobileFrontend requires MediaWiki 1.25, you have 
$wgVersion.
 You can download a more appropriate version from
 https://www.mediawiki.org/wiki/Special:ExtensionDistributor/MobileFrontend\n";;
@@ -32,7 +32,7 @@
 define( 'MOBILEFRONTEND', 'MobileFrontend' );
 
 // Extension credits that will show up on Special:Version
-$wgExtensionCredits['other'][] = array(
+$GLOBALS['wgExtensionCredits']['other'][] = array(
        'path' => __FILE__,
        'name' => 'MobileFrontend',
        'author' => array( 'Patrick Reilly', 'Max Semenik', 'Jon Robson', 
'Arthur Richards',
@@ -41,11 +41,11 @@
        'url' => 'https://www.mediawiki.org/wiki/Extension:MobileFrontend',
 );
 
-$wgMessagesDirs['MobileFrontend'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['MobileFrontendAlias'] = __DIR__ . 
"/MobileFrontend.alias.php";
+$GLOBALS['wgMessagesDirs']['MobileFrontend'] = __DIR__ . '/i18n';
+$GLOBALS['wgExtensionMessagesFiles']['MobileFrontendAlias'] = __DIR__ . 
"/MobileFrontend.alias.php";
 
 // autoload extension classes
-$autoloadClasses = array (
+$GLOBALS['autoloadClasses'] = array (
        'ExtMobileFrontend' => 'MobileFrontend.body',
        'MobileFrontendHooks' => 'MobileFrontend.hooks',
 
@@ -109,53 +109,53 @@
        $wgAutoloadClasses[$className] = __DIR__ . 
"/includes/$classFilename.php";
 }
 
-$wgExtensionFunctions[] = 'efMobileFrontend_Setup';
+$GLOBALS['wgExtensionFunctions'][] = 'efMobileFrontend_Setup';
 
-$wgAPIModules['mobileview'] = 'ApiMobileView';
+$GLOBALS['wgAPIModules']['mobileview'] = 'ApiMobileView';
 
-$wgHooks['APIGetAllowedParams'][] = 'ApiParseExtender::onAPIGetAllowedParams';
-$wgHooks['APIAfterExecute'][] = 'ApiParseExtender::onAPIAfterExecute';
-$wgHooks['APIGetParamDescription'][] = 
'ApiParseExtender::onAPIGetParamDescription';
-$wgHooks['APIGetDescription'][] = 'ApiParseExtender::onAPIGetDescription';
+$GLOBALS['wgHooks']['APIGetAllowedParams'][] = 
'ApiParseExtender::onAPIGetAllowedParams';
+$GLOBALS['wgHooks']['APIAfterExecute'][] = 
'ApiParseExtender::onAPIAfterExecute';
+$GLOBALS['wgHooks']['APIGetParamDescription'][] = 
'ApiParseExtender::onAPIGetParamDescription';
+$GLOBALS['wgHooks']['APIGetDescription'][] = 
'ApiParseExtender::onAPIGetDescription';
 
-$wgHooks['LinksUpdate'][] = 'MobileFrontendHooks::onLinksUpdate';
-$wgHooks['RequestContextCreateSkin'][] = 
'MobileFrontendHooks::onRequestContextCreateSkin';
-$wgHooks['MediaWikiPerformAction'][] = 
'MobileFrontendHooks::onMediaWikiPerformAction';
-$wgHooks['SkinTemplateOutputPageBeforeExec'][] =
+$GLOBALS['wgHooks']['LinksUpdate'][] = 'MobileFrontendHooks::onLinksUpdate';
+$GLOBALS['wgHooks']['RequestContextCreateSkin'][] = 
'MobileFrontendHooks::onRequestContextCreateSkin';
+$GLOBALS['wgHooks']['MediaWikiPerformAction'][] = 
'MobileFrontendHooks::onMediaWikiPerformAction';
+$GLOBALS['wgHooks']['SkinTemplateOutputPageBeforeExec'][] =
        'MobileFrontendHooks::onSkinTemplateOutputPageBeforeExec';
-$wgHooks['BeforePageRedirect'][] = 'MobileFrontendHooks::onBeforePageRedirect';
-$wgHooks['DiffViewHeader'][] = 'MobileFrontendHooks::onDiffViewHeader';
-$wgHooks['ResourceLoaderTestModules'][] = 
'MobileFrontendHooks::onResourceLoaderTestModules';
-$wgHooks['GetCacheVaryCookies'][] = 
'MobileFrontendHooks::onGetCacheVaryCookies';
-$wgHooks['ResourceLoaderGetConfigVars'][] = 
'MobileFrontendHooks::onResourceLoaderGetConfigVars';
-$wgHooks['SpecialPage_initList'][] = 
'MobileFrontendHooks::onSpecialPage_initList';
-$wgHooks['ListDefinedTags'][] = 'MobileFrontendHooks::onListDefinedTags';
-$wgHooks['RecentChange_save'][] = 'MobileFrontendHooks::onRecentChange_save';
-$wgHooks['AbuseFilter-generateUserVars'][] = 
'MobileFrontendHooks::onAbuseFilterGenerateUserVars';
-$wgHooks['AbuseFilter-builder'][] = 
'MobileFrontendHooks::onAbuseFilterBuilder';
-$wgHooks['SpecialPageBeforeExecute'][] = 
'MobileFrontendHooks::onSpecialPageBeforeExecute';
-$wgHooks['UserLoginComplete'][] = 'MobileFrontendHooks::onUserLoginComplete';
-$wgHooks['UserLoginForm'][] = 'MobileFrontendHooks::onUserLoginForm';
-$wgHooks['UserCreateForm'][] = 'MobileFrontendHooks::onUserCreateForm';
-$wgHooks['BeforePageDisplay'][] = 'MobileFrontendHooks::onBeforePageDisplay';
-$wgHooks['CustomEditor'][] = 'MobileFrontendHooks::onCustomEditor';
-$wgHooks['GetPreferences'][] = 'MobileFrontendHooks::onGetPreferences';
-$wgHooks['GetBetaFeaturePreferences'][] = 
'MobileFrontendHooks::onGetBetaFeaturePreferences';
-$wgHooks['Gadgets::allowLegacy'][] = 
'MobileFrontendHooks::onAllowLegacyGadgets';
-$wgHooks['UnitTestsList'][] = 'MobileFrontendHooks::onUnitTestsList';
-$wgHooks['CentralAuthLoginRedirectData'][] = 
'MobileFrontendHooks::onCentralAuthLoginRedirectData';
-$wgHooks['CentralAuthSilentLoginRedirect'][] =
+$GLOBALS['wgHooks']['BeforePageRedirect'][] = 
'MobileFrontendHooks::onBeforePageRedirect';
+$GLOBALS['wgHooks']['DiffViewHeader'][] = 
'MobileFrontendHooks::onDiffViewHeader';
+$GLOBALS['wgHooks']['ResourceLoaderTestModules'][] = 
'MobileFrontendHooks::onResourceLoaderTestModules';
+$GLOBALS['wgHooks']['GetCacheVaryCookies'][] = 
'MobileFrontendHooks::onGetCacheVaryCookies';
+$GLOBALS['wgHooks']['ResourceLoaderGetConfigVars'][] = 
'MobileFrontendHooks::onResourceLoaderGetConfigVars';
+$GLOBALS['wgHooks']['SpecialPage_initList'][] = 
'MobileFrontendHooks::onSpecialPage_initList';
+$GLOBALS['wgHooks']['ListDefinedTags'][] = 
'MobileFrontendHooks::onListDefinedTags';
+$GLOBALS['wgHooks']['RecentChange_save'][] = 
'MobileFrontendHooks::onRecentChange_save';
+$GLOBALS['wgHooks']['AbuseFilter-generateUserVars'][] = 
'MobileFrontendHooks::onAbuseFilterGenerateUserVars';
+$GLOBALS['wgHooks']['AbuseFilter-builder'][] = 
'MobileFrontendHooks::onAbuseFilterBuilder';
+$GLOBALS['wgHooks']['SpecialPageBeforeExecute'][] = 
'MobileFrontendHooks::onSpecialPageBeforeExecute';
+$GLOBALS['wgHooks']['UserLoginComplete'][] = 
'MobileFrontendHooks::onUserLoginComplete';
+$GLOBALS['wgHooks']['UserLoginForm'][] = 
'MobileFrontendHooks::onUserLoginForm';
+$GLOBALS['wgHooks']['UserCreateForm'][] = 
'MobileFrontendHooks::onUserCreateForm';
+$GLOBALS['wgHooks']['BeforePageDisplay'][] = 
'MobileFrontendHooks::onBeforePageDisplay';
+$GLOBALS['wgHooks']['CustomEditor'][] = 'MobileFrontendHooks::onCustomEditor';
+$GLOBALS['wgHooks']['GetPreferences'][] = 
'MobileFrontendHooks::onGetPreferences';
+$GLOBALS['wgHooks']['GetBetaFeaturePreferences'][] = 
'MobileFrontendHooks::onGetBetaFeaturePreferences';
+$GLOBALS['wgHooks']['Gadgets::allowLegacy'][] = 
'MobileFrontendHooks::onAllowLegacyGadgets';
+$GLOBALS['wgHooks']['UnitTestsList'][] = 
'MobileFrontendHooks::onUnitTestsList';
+$GLOBALS['wgHooks']['CentralAuthLoginRedirectData'][] = 
'MobileFrontendHooks::onCentralAuthLoginRedirectData';
+$GLOBALS['wgHooks']['CentralAuthSilentLoginRedirect'][] =
        'MobileFrontendHooks::onCentralAuthSilentLoginRedirect';
-$wgHooks['ResourceLoaderRegisterModules'][] =
+$GLOBALS['wgHooks']['ResourceLoaderRegisterModules'][] =
        'MobileFrontendHooks::onResourceLoaderRegisterModules';
-$wgHooks['EventLoggingRegisterSchemas'][] =
+$GLOBALS['wgHooks']['EventLoggingRegisterSchemas'][] =
        'MobileFrontendHooks::onEventLoggingRegisterSchemas';
-$wgHooks['OutputPageParserOutput'][] = 
'MobileFrontendHooks::onOutputPageParserOutput';
-$wgHooks['HTMLFileCache::useFileCache'][] = 
'MobileFrontendHooks::onHTMLFileCache_useFileCache';
-$wgHooks['LoginFormValidErrorMessages'][] = 
'MobileFrontendHooks::onLoginFormValidErrorMessages';
+$GLOBALS['wgHooks']['OutputPageParserOutput'][] = 
'MobileFrontendHooks::onOutputPageParserOutput';
+$GLOBALS['wgHooks']['HTMLFileCache::useFileCache'][] = 
'MobileFrontendHooks::onHTMLFileCache_useFileCache';
+$GLOBALS['wgHooks']['LoginFormValidErrorMessages'][] = 
'MobileFrontendHooks::onLoginFormValidErrorMessages';
 
 // use array_merge to ensure we do not override existing values set by core
-$wgSpecialPages = array_merge( $wgSpecialPages, array(
+$GLOBALS['wgSpecialPages'] = array_merge( $wgSpecialPages, array(
        'History' => 'SpecialMobileHistory',
        'MobileDiff' => 'SpecialMobileDiff',
        'MobileEditor' => 'SpecialMobileEditor',
@@ -167,13 +167,13 @@
 ) );
 
 // Register Minerva as a valid skin
-$wgValidSkinNames['minerva'] = "Minerva";
+$GLOBALS['wgValidSkinNames']['minerva'] = "Minerva";
 
 // Which users should see an upload button on pageviews?
-$wgAvailableRights[] = 'mf-uploadbutton';
-$wgGroupPermissions['*']['mf-uploadbutton'] = false;
-$wgGroupPermissions['autoconfirmed']['mf-uploadbutton'] = true;
-$wgGroupPermissions['sysop']['mf-uploadbutton'] = true;
+$GLOBALS['wgAvailableRights'][] = 'mf-uploadbutton';
+$GLOBALS['wgGroupPermissions']['*']['mf-uploadbutton'] = false;
+$GLOBALS['wgGroupPermissions']['autoconfirmed']['mf-uploadbutton'] = true;
+$GLOBALS['wgGroupPermissions']['sysop']['mf-uploadbutton'] = true;
 
 /**
  * Setup MobileFrontend, load global components
@@ -209,7 +209,7 @@
 }
 
 // Config instance
-$wgConfigRegistry['mobilefrontend'] = 'GlobalVarConfig::newInstance';
+$GLOBALS['wgConfigRegistry']['mobilefrontend'] = 
'GlobalVarConfig::newInstance';
 
 // ResourceLoader modules
 
diff --git a/includes/config/Wikidata.php b/includes/config/Wikidata.php
index 1cd84dd..58ea0e1 100644
--- a/includes/config/Wikidata.php
+++ b/includes/config/Wikidata.php
@@ -136,6 +136,56 @@
                                array( 'id' => 'P78' ),
                ),
        ),
+       // university
+       3918 => array(
+               'rows' => array(
+                       // logo
+                       array( 'id' => 'P154' ),
+                       // motto
+                       array( 'id' => 'P1451' ),
+                       // inception
+                       array( 'id' => 'P571' ),
+                       // location
+                       array( 'id' => 'P276' ),
+                       // coords
+                       array( 'id' => 'P625' ),
+                       // staff
+                       array( 'id' => 'P1128' ),
+                       // affliations
+                       array( 'id' => 'P1416' ),
+                       // coat of arms
+                       array( 'id' => 'P94' ),
+               ),
+       ),
+       // television
+       5398426 => array(
+               'rows' => array(
+                       // genre
+                       array( 'id' => 'P136' ),
+                       // creator
+                       array( 'id' => 'P170' ),
+                       // writer
+                       array( 'id' => 'P58' ),
+                       // director
+                       array( 'id' => 'P57' ),
+                       // cast members
+                       array( 'id' => 'P1' ),
+                       // music
+                       array( 'id' => 'P86' ),
+                       // origin
+                       array( 'id' => 'P495' ),
+                       // original language
+                       array( 'id' => 'P364' ),
+                       // location
+                       array( 'id' => 'P276' ),
+                       // production
+                       array( 'id' => 'P272' ),
+                       // distributor
+                       array( 'id' => 'P750' ),
+                       // time of publication
+                       array( 'id' => 'P577' ),
+               ),
+       ),
        // city
        515 => array(
                'rows' => array(

-- 
To view, visit https://gerrit.wikimedia.org/r/185209
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie881dcf794e5ae7d1cc72741e61b10e250cb61d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to