Jdlrobson has uploaded a new change for review.

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

Change subject: Remove commonsCategory beta feature
......................................................................

Remove commonsCategory beta feature

It is not tracked anywhere in Phabricator and MFWikibaseImageCategory
is not enabled anywhere so this code is dormant.

As the creator I have no interest in maintaining this
any more so let's get this removed.

Change-Id: I37224d57fa54df728a1ec6e308b84abc323231dd
---
M README.md
M extension.json
M includes/MobileFrontend.hooks.php
M includes/skins/SkinMinervaBeta.php
D resources/skins.minerva.beta.scripts/commonsCategory.js
5 files changed, 0 insertions(+), 48 deletions(-)


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

diff --git a/README.md b/README.md
index a1cac56..0b59fbb 100644
--- a/README.md
+++ b/README.md
@@ -531,9 +531,3 @@
 
 Type: Boolean
 Default: false;
-
-##### $wgMFWikibaseImageCategory
-Define the property that holds a string representing a category on 
$wgMFPhotoUploadEndpoint
-
-Type: String
-Default: '';
diff --git a/extension.json b/extension.json
index 281dd7d..59a9bdc 100644
--- a/extension.json
+++ b/extension.json
@@ -1806,7 +1806,6 @@
                                "mobile.backtotop"
                        ],
                        "scripts": [
-                               
"resources/skins.minerva.beta.scripts/commonsCategory.js",
                                
"resources/skins.minerva.beta.scripts/fontchanger.js"
                        ],
                        "messages": [
@@ -2074,7 +2073,6 @@
                "MFUploadMinEdits": 0,
                "MFUseWikibaseDescription": false,
                "MFDisplayWikibaseDescription": false,
-               "MFWikibaseImageCategory": "",
                "MFRSSFeedLink": false,
                "MFSchemaMobileWebLanguageSwitcherSampleRate": {
                        "beta": 0,
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 561b74f..84ccd7b 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1253,8 +1253,6 @@
         * @return bool
         */
        public static function onOutputPageParserOutput( $outputPage, 
ParserOutput $po ) {
-               global $wgMFWikibaseImageCategory;
-
                $context = MobileContext::singleton();
                $isBeta = $context->isBetaGroupMember();
                $mfUseWikibaseDescription = $context->getMFConfig()->get( 
'MFUseWikibaseDescription' );
@@ -1267,12 +1265,8 @@
                                $item = $po->getProperty( 'wikibase_item' );
                                if ( $item ) {
                                        $desc = 
ExtMobileFrontend::getWikibaseDescription( $item );
-                                       $category =  
ExtMobileFrontend::getWikibasePropertyValue( $item, $wgMFWikibaseImageCategory 
);
                                        if ( $desc ) {
                                                $outputPage->setProperty( 
'wgMFDescription', $desc );
-                                       }
-                                       if ( $category ) {
-                                               $outputPage->setProperty( 
'wgMFImagesCategory', $category );
                                        }
                                }
                        }
diff --git a/includes/skins/SkinMinervaBeta.php 
b/includes/skins/SkinMinervaBeta.php
index 89c2ee0..481493d 100644
--- a/includes/skins/SkinMinervaBeta.php
+++ b/includes/skins/SkinMinervaBeta.php
@@ -88,7 +88,6 @@
        public function getSkinConfigVariables() {
                $vars = parent::getSkinConfigVariables();
                $vars['wgMFDescription'] = $this->getOutput()->getProperty( 
'wgMFDescription' );
-               $vars['wgMFImagesCategory'] = $this->getOutput()->getProperty( 
'wgMFImagesCategory' );
 
                return $vars;
        }
diff --git a/resources/skins.minerva.beta.scripts/commonsCategory.js 
b/resources/skins.minerva.beta.scripts/commonsCategory.js
deleted file mode 100644
index 020acbe..0000000
--- a/resources/skins.minerva.beta.scripts/commonsCategory.js
+++ /dev/null
@@ -1,33 +0,0 @@
-( function ( M, $ ) {
-       var category,
-               JSONPForeignApi = M.require( 
'mobile.foreignApi/JSONPForeignApi' ),
-               loader = M.require( 'mobile.overlays/moduleLoader' ),
-               Anchor = M.require( 'mobile.startup/Anchor' ),
-               page = M.getCurrentPage(),
-               overlayManager = M.require( 'mobile.startup/overlayManager' );
-
-       overlayManager.add( /^\/commons-category\/(.+)$/, function ( title ) {
-               var d = $.Deferred();
-
-               loader.loadModule( 'mobile.commonsCategory' ).done( function () 
{
-                       var CommonsCategoryOverlay = M.require( 
'mobile.commonsCategory/CommonsCategoryOverlay' );
-                       d.resolve(
-                               new CommonsCategoryOverlay( {
-                                       api: new JSONPForeignApi( 
mw.config.get( 'wgMFPhotoUploadEndpoint' ) ),
-                                       title: title
-                               } )
-                       );
-               } );
-               return d;
-       } );
-
-       category = mw.config.get( 'wgMFImagesCategory' );
-       if ( category ) {
-               new Anchor( {
-                       progressive: true,
-                       href: '#/commons-category/' + category,
-                       label: mw.msg( 'mobile-frontend-commons-category-view', 
page.title )
-               } ).appendTo( '.pre-content' );
-       }
-
-}( mw.mobileFrontend, jQuery ) );

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

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

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

Reply via email to