jenkins-bot has submitted this change and it was merged.
Change subject: Convert extension registration to use skin.json
......................................................................
Convert extension registration to use skin.json
Change-Id: Ieaff6605c12bc16dcaf0fe205ce374de147b093c
---
M Daddio.php
A skin.json
2 files changed, 52 insertions(+), 26 deletions(-)
Approvals:
Jack Phoenix: Looks good to me, approved
jenkins-bot: Verified
diff --git a/Daddio.php b/Daddio.php
index da9a2b9..2852b7a 100644
--- a/Daddio.php
+++ b/Daddio.php
@@ -10,32 +10,18 @@
*
* To install place the Daddio folder (the folder containing this file!) into
* skins/ and add this line to your wiki's LocalSettings.php:
- * require_once("$IP/skins/Daddio/Daddio.php");
+ * wfLoadSkin( 'Daddio' );
*/
-$wgExtensionCredits['skin'][] = array(
- 'path' => __FILE__,
- 'name' => 'Daddio',
- // @todo FIXME: add a meaningful version number
- 'author' => array( 'Rufus Post', 'Aaron Schulz' ),
- 'descriptionmsg' => 'daddio-desc',
- 'url' => 'https://www.mediawiki.org/wiki/Skin:Daddio',
-);
-
-$wgValidSkinNames['daddio'] = 'Daddio';
-// *cough cough* assumptions...
-if ( !isset( $wgAutoloadClasses['ModernTemplate'] ) ) {
- $wgAutoloadClasses['ModernTemplate'] = __DIR__ .
'/../Modern/SkinModern.php';
+if ( function_exists( 'wfLoadSkin' ) ) {
+ wfLoadSkin( 'Daddio' );
+ // Keep i18n globals so mergeMessageFileList.php doesn't break
+ $wgMessagesDirs['Daddio'] = __DIR__ . '/i18n';
+ wfWarn(
+ 'Deprecated PHP entry point used for Daddio skin. Please use
wfLoadSkin instead, ' .
+ 'see https://www.mediawiki.org/wiki/Extension_registration for
more details.'
+ );
+ return;
+} else {
+ die( 'This version of the Daddio skin requires MediaWiki 1.25+' );
}
-$wgAutoloadClasses['SkinDaddio'] = __DIR__ . '/Daddio.skin.php';
-$wgMessagesDirs['SkinDaddio'] = __DIR__ . '/i18n';
-
-$wgResourceModules['skins.daddio'] = array(
- 'styles' => array(
- 'daddio/main.css' => array( 'media' => 'screen' ),
- 'daddio/print.css' => array( 'media' => 'print' )
- ),
- 'position' => 'top',
- 'localBasePath' => __DIR__,
- 'remoteSkinPath' => 'Daddio',
-);
diff --git a/skin.json b/skin.json
new file mode 100644
index 0000000..aa1179a
--- /dev/null
+++ b/skin.json
@@ -0,0 +1,40 @@
+{
+ "name": "Daddio",
+ "author": [
+ "Rufus Post",
+ "Aaron Schulz"
+ ],
+ "url": "https://www.mediawiki.org/wiki/Skin:Daddio",
+ "descriptionmsg": "daddio-desc",
+ "type": "skin",
+ "ValidSkinNames": {
+ "daddio": "Daddio"
+ },
+ "MessagesDirs": {
+ "SkinDaddio": [
+ "i18n"
+ ]
+ },
+ "AutoloadClasses": {
+ "DaddioTemplate": "Daddio.skin.php",
+ "SkinDaddio": "Daddio.skin.php"
+ },
+ "ResourceModules": {
+ "skins.daddio": {
+ "styles": {
+ "daddio/main.css": {
+ "media": "screen"
+ },
+ "daddio/print.css": {
+ "media": "print"
+ }
+ },
+ "position": "top"
+ }
+ },
+ "ResourceFileModulePaths": {
+ "localBasePath": "",
+ "remoteSkinPath": "Daddio"
+ },
+ "manifest_version": 1
+}
--
To view, visit https://gerrit.wikimedia.org/r/213206
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ieaff6605c12bc16dcaf0fe205ce374de147b093c
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/skins/Daddio
Gerrit-Branch: master
Gerrit-Owner: Isarra <[email protected]>
Gerrit-Reviewer: Aklapper <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits