Isarra has uploaded a new change for review.

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

Change subject: Convert extension registration to use skin.json
......................................................................

Convert extension registration to use skin.json

Change-Id: I0b1b71786ce30b0bffdb9e66cd4b308cecb6a0aa
---
M Bouquet.php
A skin.json
2 files changed, 72 insertions(+), 56 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Bouquet 
refs/changes/94/213194/1

diff --git a/Bouquet.php b/Bouquet.php
old mode 100644
new mode 100755
index 50d5d21..78ff844
--- a/Bouquet.php
+++ b/Bouquet.php
@@ -15,62 +15,19 @@
  *
  * To install, place the Bouquet folder (the folder containing this file!) into
  * skins/ and add this line to your wiki's LocalSettings.php:
- * require_once("$IP/skins/Bouquet/Bouquet.php");
+ * wfLoadSkin( 'Bouquet' );
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-       die( 'Not a valid entry point.' );
+ if ( function_exists( 'wfLoadSkin' ) ) {
+       wfLoadSkin( 'Bouquet' );
+       // Keep i18n globals so mergeMessageFileList.php doesn't break
+       $wgMessagesDirs['Bouquet'] = __DIR__ . '/i18n';
+       $wgExtensionMessagesFiles['Bouquet'] = __DIR__ . '/Bouquet.alias.php';
+       wfWarn(
+               'Deprecated PHP entry point used for Bouquet skin. Please use 
wfLoadSkin instead, ' .
+               'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+       );
+       return;
+} else {
+       die( 'This version of the Bouquet skin requires MediaWiki 1.25+' );
 }
-
-// Skin credits that will show up on Special:Version
-$wgExtensionCredits['skin'][] = array(
-       'path' => __FILE__,
-       'name' => 'Bouquet',
-       'version' => '1.2.2',
-       'author' => array( '[http://automattic.com Automattic]', 'Jack Phoenix' 
),
-       'description' => 'Elegant, simple theme inspired by the beauty found in 
flowers',
-       'url' => 'https://www.mediawiki.org/wiki/Skin:Bouquet',
-);
-
-// The first instance must be strtolower()ed so that useskin=bouquet works and
-// so that it does *not* force an initial capital (i.e. we do NOT want
-// useskin=Bouquet) and the second instance is used to determine the name of
-// *this* file.
-$wgValidSkinNames['bouquet'] = 'Bouquet';
-
-// Autoload the skin class, set up i18n, set up CSS & JS (via ResourceLoader)
-$wgAutoloadClasses['SkinBouquet'] = __DIR__ . '/Bouquet.skin.php';
-$wgMessagesDirs['SkinBouquet'] = __DIR__ . '/i18n';
-
-$wgResourceModules['skins.bouquet'] = array(
-       'styles' => array(
-               // Styles custom to the Bouquet skin
-               'skins/Bouquet/resources/print.css' => array( 'media' => 
'print' ),
-               'skins/Bouquet/resources/style.css' => array( 'media' => 
'screen' )
-       ),
-       'position' => 'top'
-);
-
-// JS module
-$wgResourceModules['skins.bouquet.js'] = array(
-       'scripts' => '/skins/Bouquet/resources/js/navigation.js'
-);
-
-// Themes
-$wgResourceModules['themeloader.skins.bouquet.forgetmenot'] = array(
-       'styles' => array(
-               
'skins/Bouquet/resources/colors/forget-me-not/forget-me-not.css' => array( 
'media' => 'screen' )
-       )
-);
-
-$wgResourceModules['themeloader.skins.bouquet.pinkdogwood'] = array(
-       'styles' => array(
-               'skins/Bouquet/resources/colors/pink-dogwood/pink-dogwood.css' 
=> array( 'media' => 'screen' )
-       )
-);
-
-$wgResourceModules['themeloader.skins.bouquet.tigerlily'] = array(
-       'styles' => array(
-               'skins/Bouquet/resources/colors/tiger-lily/tiger-lily.css' => 
array( 'media' => 'screen' )
-       )
-);
\ No newline at end of file
diff --git a/skin.json b/skin.json
new file mode 100644
index 0000000..a9c0f4f
--- /dev/null
+++ b/skin.json
@@ -0,0 +1,59 @@
+{
+       "name": "Bouquet",
+       "version": "1.2.2",
+       "author": [
+               "[http://automattic.com Automattic]",
+               "Jack Phoenix"
+       ],
+       "url": "https://www.mediawiki.org/wiki/Skin:Bouquet";,
+       "description": "Elegant, simple theme inspired by the beauty found in 
flowers",
+       "type": "skin",
+       "ValidSkinNames": {
+               "bouquet": "Bouquet"
+       },
+       "MessagesDirs": {
+               "SkinBouquet": [
+                       "i18n"
+               ]
+       },
+       "AutoloadClasses": {
+               "SkinBouquet": "Bouquet.skin.php"
+       },
+       "ResourceModules": {
+               "skins.bouquet": {
+                       "styles": {
+                               "skins/Bouquet/resources/print.css": {
+                                       "media": "print"
+                               },
+                               "skins/Bouquet/resources/style.css": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bouquet.js": {
+                       "scripts": "/skins/Bouquet/resources/js/navigation.js"
+               },
+               "themeloader.skins.bouquet.forgetmenot": {
+                       "styles": {
+                               
"skins/Bouquet/resources/colors/forget-me-not/forget-me-not.css": {
+                                       "media": "screen"
+                               }
+                       }
+               },
+               "themeloader.skins.bouquet.pinkdogwood": {
+                       "styles": {
+                               
"skins/Bouquet/resources/colors/pink-dogwood/pink-dogwood.css": {
+                                       "media": "screen"
+                               }
+                       }
+               },
+               "themeloader.skins.bouquet.tigerlily": {
+                       "styles": {
+                               
"skins/Bouquet/resources/colors/tiger-lily/tiger-lily.css": {
+                                       "media": "screen"
+                               }
+                       }
+               }
+       }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b1b71786ce30b0bffdb9e66cd4b308cecb6a0aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Bouquet
Gerrit-Branch: master
Gerrit-Owner: Isarra <[email protected]>

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

Reply via email to