Phuedx has uploaded a new change for review.

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

Change subject: Remove the red links configuration variables
......................................................................

Remove the red links configuration variables

Remove the old wgMFShowRedLinks and wgMFShowRedLinksAnon configuration
variables and update/simplify the corresponding SkinMinerva tests.

Change-Id: I2fdddffb4983fc2ae4de572f2698c2fd56b39052
---
M includes/config/Editing.php
M includes/skins/SkinMinerva.php
M tests/phpunit/skins/SkinMinervaTest.php
3 files changed, 9 insertions(+), 50 deletions(-)


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

diff --git a/includes/config/Editing.php b/includes/config/Editing.php
index 9602fd5..6ac7000 100644
--- a/includes/config/Editing.php
+++ b/includes/config/Editing.php
@@ -4,19 +4,6 @@
 }
 
 /**
- * Specify whether to show redlinks (page doesn't exist) for logged in users 
using stable mode.
- * This hasn't any effect to beta and alpha mode!
- * This variable is temporary only.
- */
-$wgMFShowRedLinks = false;
-
-/**
- * Specify whether show redlinks (page doesn't exist) for anonymous users 
using stable mode.
- * This hasn't any effect to beta and alpha mode!
- */
-$wgMFShowRedLinksAnon = false;
-
-/**
  * Options to control several functions of the mobile editor.
  * Possible values:
  * - 'anonymousEditing':
diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index e077eed..f76d077 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -845,8 +845,7 @@
                        $wgMFEditorOptions,
                        $wgMFWikiDataEndpoint,
                        $wgMFPhotoUploadEndpoint, $wgMFPhotoUploadAppendToDesc,
-                       $wgMFCollapseSectionsByDefault, $wgMFShowRedLinksAnon,
-                       $wgMFShowRedLinks;
+                       $wgMFCollapseSectionsByDefault;
 
                $title = $this->getTitle();
                $user = $this->getUser();
diff --git a/tests/phpunit/skins/SkinMinervaTest.php 
b/tests/phpunit/skins/SkinMinervaTest.php
index f0b5e06..f82990a 100644
--- a/tests/phpunit/skins/SkinMinervaTest.php
+++ b/tests/phpunit/skins/SkinMinervaTest.php
@@ -8,13 +8,9 @@
        /**
         * @dataProvider providerShowRedLinks
         */
-       public function testGetSkinConfigVariables( $showRedLinks, 
$showRedLinksAnon,
-               $mode, $username, $expected
-       ) {
+       public function testGetSkinConfigVariables( $mode, $username, $expected 
) {
                // set config variables, which we test here
                $values = array(
-                       'wgMFShowRedLinks' => $showRedLinks,
-                       'wgMFShowRedLinksAnon' => $showRedLinksAnon,
                        'wgMFEnableBeta' => true
                );
                $this->setMwGlobals( $values );
@@ -45,37 +41,14 @@
         */
        public function providerShowRedLinks() {
                // UTSysop is logged in, NotLoggedIn isn't
-               // $wgMFShowRedLinks, $wgMFShowRedLinksAnon, mobile mode, user, 
expected
+               // mobile mode, user, expected
                return array(
-                       // test in stable mode
-                       array( false, false, 'stable', 'UTSysop', false ),
-                       array( true, false, 'stable', 'UTSysop', false ),
-                       array( false, true, 'stable', 'UTSysop', false ),
-                       array( true, true, 'stable', 'UTSysop', false ),
-                       array( false, false, 'stable', 'NotLoggedIn', false ),
-                       array( true, false, 'stable', 'NotLoggedIn', false ),
-                       array( false, true, 'stable', 'NotLoggedIn', false ),
-                       array( true, true, 'stable', 'NotLoggedIn', false ),
-
-                       // test in beta mode
-                       array( false, false, 'beta', 'NotLoggedIn', false ),
-                       array( true, false, 'beta', 'NotLoggedIn', false ),
-                       array( false, true, 'beta', 'NotLoggedIn', false ),
-                       array( true, true, 'beta', 'NotLoggedIn', false ),
-                       array( false, false, 'beta', 'UTSysop', false ),
-                       array( true, false, 'beta', 'UTSysop', false ),
-                       array( false, true, 'beta', 'UTSysop', false ),
-                       array( true, true, 'beta', 'UTSysop', false ),
-
-                       // test in alpha mode
-                       array( false, false, 'alpha', 'NotLoggedIn', true ),
-                       array( true, false, 'alpha', 'NotLoggedIn', true ),
-                       array( false, true, 'alpha', 'NotLoggedIn', true ),
-                       array( true, true, 'alpha', 'NotLoggedIn', true ),
-                       array( false, false, 'alpha', 'UTSysop', true ),
-                       array( true, false, 'alpha', 'UTSysop', true ),
-                       array( false, true, 'alpha', 'UTSysop', true ),
-                       array( true, true, 'alpha', 'UTSysop', true ),
+                       array( 'stable', 'UTSysop', false ),
+                       array( 'stable', 'NotLoggedIn', false ),
+                       array( 'beta', 'NotLoggedIn', false ),
+                       array( 'beta', 'UTSysop', false ),
+                       array( 'alpha', 'NotLoggedIn', true ),
+                       array( 'alpha', 'UTSysop', true ),
                );
        }
 }

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

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

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

Reply via email to