MtDu has uploaded a new change for review.

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

Change subject: Deprecate and empty PHP entry point
......................................................................

Deprecate and empty PHP entry point

Change-Id: I9207010deb7d3c1eca3223fcb1244c7436002413
---
M WPtouch.php
1 file changed, 12 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/WPtouch 
refs/changes/26/266026/1

diff --git a/WPtouch.php b/WPtouch.php
index caa1621..c3f9de6 100644
--- a/WPtouch.php
+++ b/WPtouch.php
@@ -12,46 +12,15 @@
  * skins/ and add this line to your wiki's LocalSettings.php:
  * require_once "$IP/skins/WPtouch/WPtouch.php";
  */
-
-// Skin credits that will show up on Special:Version
-$wgExtensionCredits['skin'][] = array(
-       'path' => __FILE__,
-       'name' => 'WPtouch',
-       'version' => '1.0',
-       'author' => array( 'Dale Mugford', 'Duane Storey', 'Dan Flores', 'Jack 
Phoenix' ),
-       'description' => 'Simple skin for mobile devices',
-       'url' => 'https://www.mediawiki.org/wiki/Skin:WPtouch',
-);
-
-$wgHooks['OutputPageBodyAttributes'][] = 
'SkinWPtouch::onOutputPageBodyAttributes';
-
-// The first instance must be strtolower()ed so that useskin=wptouch works and
-// so that it does *not* force an initial capital (i.e. we do NOT want
-// useskin=Wptouch) and the second instance is used to determine the name of
-// *this* file.
-$wgValidSkinNames['wptouch'] = 'WPtouch';
-
-// Autoload the skin class and set up CSS & JS (via ResourceLoader)
-$wgAutoloadClasses['SkinWPtouch'] = __DIR__ . '/WPtouch.skin.php';
-$wgAutoloadClasses['WPtouchTemplate'] = __DIR__ . '/WPtouch.skin.php';
-
-// Internationalization
-$wgMessagesDirs['SkinWPtouch'] = __DIR__ . '/i18n';
-
-$wgResourceModules['skins.wptouch'] = array(
-       'styles' => array(
-               'main.css' => array( 'media' => 'screen' ),
-               'really-small.css' => array( 'media' => 'all and (max-width: 
350px)' )
-       ),
-       'position' => 'top',
-       'remoteBasePath' => $wgStylePath . '/WPtouch/resources/css',
-       'remoteExtPath' => $wgStylePath . '/WPtouch/resources/css',
-       'localBasePath' => __DIR__ . '/resources/css'
-);
-
-$wgResourceModules['skins.wptouch.js'] = array(
-       'scripts' => array( 'core.js', 'url-bar.js' ),
-       'remoteBasePath' => $wgStylePath . '/WPtouch/resources/javascript',
-       'remoteExtPath' => $wgStylePath . '/WPtouch/resources/javascript',
-       'localBasePath' => __DIR__ . '/resources/javascript'
-);
\ No newline at end of file
+if ( function_exists( 'wfLoadSkin' ) ) {
+       wfLoadSkin( 'WPtouch' );
+       // Keep i18n globals so mergeMessageFileList.php doesn't break
+       $wgMessagesDirs['WPtouch'] = __DIR__ . '/i18n';
+       /*wfWarn(
+               'Deprecated PHP entry point used for WPtouch skin. Please use 
wfLoadSkin instead, ' .
+               'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+       );*/
+       return;
+} else {
+       die( 'This version of the WPtouch skin requires MediaWiki 1.25+' );
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9207010deb7d3c1eca3223fcb1244c7436002413
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/WPtouch
Gerrit-Branch: master
Gerrit-Owner: MtDu <[email protected]>

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

Reply via email to