jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/367688 )

Change subject: Hygiene: Drop MFAllowNonJavaScriptEditing and 
Special:MobileEditor
......................................................................


Hygiene: Drop MFAllowNonJavaScriptEditing and Special:MobileEditor

Bug: T125174
Change-Id: Ifc0efcb87605e5cd678343d1ac91a2ce53b33664
---
M includes/skins/SkinMinerva.php
1 file changed, 5 insertions(+), 12 deletions(-)

Approvals:
  jenkins-bot: Verified
  Jforrester: Looks good to me, approved

Objections:
  Jdlrobson: There's a problem with this change, please improve



diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index 85ed2de..849497f 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -223,10 +223,7 @@
         * @return string
         */
        public function doEditSectionLink( Title $nt, $section, $tooltip = 
null, $lang = false ) {
-               $noJsEdit = $this->getConfig()->get( 
'MFAllowNonJavaScriptEditing' );
-
                if ( $this->isAllowedPageAction( 'edit' ) ) {
-                       $additionalClass = $noJsEdit ? ' nojs-edit': '';
                        $lang = wfGetLangObj( $lang );
                        $message = $this->msg( 'mobile-frontend-editor-edit' 
)->inLanguage( $lang )->text();
                        $html = Html::openElement( 'span' );
@@ -236,7 +233,7 @@
                                'data-section' => $section,
                                // Note visibility of the edit section link 
button is controlled by .edit-page in ui.less so
                                // we default to enabled even though this may 
not be true.
-                               'class' => MobileUI::iconClass( 'edit-enabled', 
'element', 'edit-page' . $additionalClass ),
+                               'class' => MobileUI::iconClass( 'edit-enabled', 
'element', 'edit-page' ),
                        ], $message );
                        $html .= Html::closeElement( 'span' );
                        return $html;
@@ -665,7 +662,6 @@
         */
        protected function insertLogInOutMenuItem( MenuBuilder $menu ) {
                $query = [];
-               $canEdit = $this->getConfig()->get( 
'MFAllowNonJavaScriptEditing' );
                if ( !$this->getRequest()->wasPosted() ) {
                        $returntoquery = $this->getRequest()->getValues();
                        unset( $returntoquery['title'] );
@@ -686,7 +682,7 @@
                        $url = SpecialPage::getTitleFor( 'Userlogout' 
)->getLocalURL( $query );
                        $username = $user->getName();
 
-                       $menu->insert( 'auth', $isJSOnly = !$canEdit )
+                       $menu->insert( 'auth', false )
                                ->addComponent(
                                        $username,
                                        Title::newFromText( $username, NS_USER 
)->getLocalUrl(),
@@ -708,7 +704,7 @@
                        unset( $returntoquery['campaign'] );
                        $query[ 'returntoquery' ] = wfArrayToCgi( 
$returntoquery );
                        $url = $this->getLoginUrl( $query );
-                       $menu->insert( 'auth', $isJSOnly = !$canEdit )
+                       $menu->insert( 'auth', false )
                                ->addComponent(
                                        $this->msg( 
'mobile-frontend-main-menu-login' )->escaped(),
                                        $url,
@@ -1053,20 +1049,17 @@
         * @return array A map compatible with BaseTemplate#makeListItem
         */
        protected function createEditPageAction() {
-               $noJsEdit = $this->getConfig()->get( 
'MFAllowNonJavaScriptEditing' );
-               $additionalClass = $noJsEdit ? ' nojs-edit' : '';
-
                return [
                        'id' => 'ca-edit',
                        'text' => '',
                        'itemtitle' => $this->msg( 
'mobile-frontend-pageaction-edit-tooltip' ),
-                       'class' => MobileUI::iconClass( 'edit-enabled', 
'element' . $additionalClass ),
+                       'class' => MobileUI::iconClass( 'edit-enabled', 
'element' ),
                        'links' => [
                                'edit' => [
                                        'href' => 
$this->getTitle()->getLocalURL( [ 'action' => 'edit', 'section' => 0 ] )
                                ],
                        ],
-                       'is_js_only' => !$noJsEdit
+                       'is_js_only' => false
                ];
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc0efcb87605e5cd678343d1ac91a2ce53b33664
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Niedzielski <sniedziel...@wikimedia.org>
Gerrit-Reviewer: Pmiazga <pmia...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to