jenkins-bot has submitted this change and it was merged.

Change subject: Add extension.json, empty PHP entry point
......................................................................


Add extension.json, empty PHP entry point

Bug: T87974
Change-Id: Ib4e8dfd579afbecbad936ddff610eb33685e9118
---
M SiteMatrix.php
A extension.json
2 files changed, 97 insertions(+), 80 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SiteMatrix.php b/SiteMatrix.php
index 6616783..c652fd5 100644
--- a/SiteMatrix.php
+++ b/SiteMatrix.php
@@ -1,82 +1,14 @@
 <?php
-
-/**
- * Make an HTML table showing all the wikis on the site
- */
-
-# Not a valid entry point, skip unless MEDIAWIKI is defined
-if ( !defined( 'MEDIAWIKI' ) ) {
-       echo "This file is part of MediaWiki, it is not a valid entry point.\n";
-       exit( 1 );
+if ( function_exists( 'wfLoadExtension' ) ) {
+       wfLoadExtension( 'SiteMatrix' );
+       // Keep i18n globals so mergeMessageFileList.php doesn't break
+       $wgMessagesDirs['SiteMatrix'] = __DIR__ . '/i18n';
+       $wgExtensionMessagesFiles['SiteMatrixAliases'] = __DIR__ . 
'/SiteMatrix.alias.php';
+       /* wfWarn(
+               'Deprecated PHP entry point used for SiteMatrix extension. 
Please use wfLoadExtension instead, ' .
+               'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+       ); */
+       return true;
+} else {
+       die( 'This version of the SiteMatrix extension requires MediaWiki 
1.25+' );
 }
-
-$wgExtensionCredits['specialpage'][] = array(
-       'path'           => __FILE__,
-       'name'           => 'SiteMatrix',
-       'author'         => array( 'Tim Starling', 'Brion Vibber', 'Victor 
Vasiliev', 'Alexandre Emsenhuber' ),
-       'version'        => '1.3.0',
-       'url'            => 
'https://www.mediawiki.org/wiki/Extension:SiteMatrix',
-       'descriptionmsg' => 'sitematrix-desc',
-);
-
-$wgSiteMatrixFile = null;
-$wgSiteMatrixSites = array(
-       'wiki' => array(
-               'name' => 'Wikipedia',
-               'host' => 'www.wikipedia.org',
-               'prefix' => 'w',
-       ),
-       'wiktionary' => array(
-               'name' => 'Wiktionary',
-               'host' => 'www.wiktionary.org',
-               'prefix' => 'wikt',
-       ),
-       'wikibooks' => array(
-               'name' => 'Wikibooks',
-               'host' => 'www.wikibooks.org',
-               'prefix' => 'b',
-       ),
-       'wikinews' => array(
-               'name' => 'Wikinews',
-               'host' => 'www.wikinews.org',
-               'prefix' => 'n',
-       ),
-       'wikiquote' => array(
-               'name' => 'Wikiquote',
-               'host' => 'www.wikiquote.org',
-               'prefix' => 'q',
-       ),
-       'wikisource' => array(
-               'name' => 'Wikisource',
-               'host' => 'www.wikisource.org',
-               'prefix' => 's',
-       ),
-       'wikiversity' => array(
-               'name' => 'Wikiversity',
-               'host' => 'www.wikiversity.org',
-               'prefix' => 'v',
-       ),
-       'wikivoyage' => array(
-               'name' => 'Wikivoyage',
-               'host' => 'www.wikivoyage.org',
-               'prefix' => 'voy',
-       )
-);
-$wgSiteMatrixPrivateSites = null;
-$wgSiteMatrixFishbowlSites = null;
-$wgSiteMatrixClosedSites = null;
-
-$dir = __DIR__ . '/';
-
-$wgMessagesDirs['SiteMatrix'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['SiteMatrixAlias'] = $dir . 'SiteMatrix.alias.php';
-
-$wgAutoloadClasses['SiteMatrix'] = $dir . 'SiteMatrix_body.php';
-
-$wgAutoloadClasses['SpecialSiteMatrix'] = $dir . 'SpecialSiteMatrix.php';
-$wgSpecialPages['SiteMatrix'] = 'SpecialSiteMatrix';
-
-$wgAutoloadClasses['ApiSiteMatrix'] = $dir . 'SiteMatrixApi.php';
-$wgAPIModules['sitematrix'] = 'ApiSiteMatrix';
-
-$wgHooks['APIQuerySiteInfoGeneralInfo'][] = 
'SiteMatrix::APIQuerySiteInfoGeneralInfo';
diff --git a/extension.json b/extension.json
new file mode 100644
index 0000000..e4485ee
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,85 @@
+{
+       "name": "SiteMatrix",
+       "version": "1.3.0",
+       "author": [
+               "Tim Starling",
+               "Brion Vibber",
+               "Victor Vasiliev",
+               "Alexandre Emsenhuber"
+       ],
+       "url": "https://www.mediawiki.org/wiki/Extension:SiteMatrix";,
+       "descriptionmsg": "sitematrix-desc",
+       "type": "specialpage",
+       "SpecialPages": {
+               "SiteMatrix": "SpecialSiteMatrix"
+       },
+       "APIModules": {
+               "sitematrix": "ApiSiteMatrix"
+       },
+       "MessagesDirs": {
+               "SiteMatrix": [
+                       "i18n"
+               ]
+       },
+       "ExtensionMessagesFiles": {
+               "SiteMatrixAlias": "SiteMatrix.alias.php"
+       },
+       "AutoloadClasses": {
+               "SiteMatrix": "SiteMatrix_body.php",
+               "SpecialSiteMatrix": "SpecialSiteMatrix.php",
+               "ApiSiteMatrix": "SiteMatrixApi.php"
+       },
+       "Hooks": {
+               "APIQuerySiteInfoGeneralInfo": [
+                       "SiteMatrix::APIQuerySiteInfoGeneralInfo"
+               ]
+       },
+       "config": {
+               "SiteMatrixFile": null,
+               "SiteMatrixSites": {
+                       "wiki": {
+                               "name": "Wikipedia",
+                               "host": "www.wikipedia.org",
+                               "prefix": "w"
+                       },
+                       "wiktionary": {
+                               "name": "Wiktionary",
+                               "host": "www.wiktionary.org",
+                               "prefix": "wikt"
+                       },
+                       "wikibooks": {
+                               "name": "Wikibooks",
+                               "host": "www.wikibooks.org",
+                               "prefix": "b"
+                       },
+                       "wikinews": {
+                               "name": "Wikinews",
+                               "host": "www.wikinews.org",
+                               "prefix": "n"
+                       },
+                       "wikiquote": {
+                               "name": "Wikiquote",
+                               "host": "www.wikiquote.org",
+                               "prefix": "q"
+                       },
+                       "wikisource": {
+                               "name": "Wikisource",
+                               "host": "www.wikisource.org",
+                               "prefix": "s"
+                       },
+                       "wikiversity": {
+                               "name": "Wikiversity",
+                               "host": "www.wikiversity.org",
+                               "prefix": "v"
+                       },
+                       "wikivoyage": {
+                               "name": "Wikivoyage",
+                               "host": "www.wikivoyage.org",
+                               "prefix": "voy"
+                       }
+               },
+               "SiteMatrixPrivateSites": null,
+               "SiteMatrixFishbowlSites": null,
+               "SiteMatrixClosedSites": null
+       }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4e8dfd579afbecbad936ddff610eb33685e9118
Gerrit-PatchSet: 11
Gerrit-Project: mediawiki/extensions/SiteMatrix
Gerrit-Branch: master
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Alex Monk <kren...@gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Yurik <yu...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to