Yaron Koren has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/393616 )

Change subject: Removed unnecessary handling for MW < 1.20
......................................................................


Removed unnecessary handling for MW < 1.20

Change-Id: I103d80348c5ca1db744ae9eb3fae0d6f36001f6e
---
M SpecialReplaceText.php
1 file changed, 2 insertions(+), 34 deletions(-)

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



diff --git a/SpecialReplaceText.php b/SpecialReplaceText.php
index c8d08b4..b4fc1df 100644
--- a/SpecialReplaceText.php
+++ b/SpecialReplaceText.php
@@ -278,8 +278,6 @@
        }
 
        function showForm( $warning_msg = null ) {
-               global $wgVersion;
-
                $out = $this->getOutput();
 
                $out->addHTML(
@@ -345,44 +343,14 @@
                // message to see if we can use this functionality here.
                if ( $this->msg( 'powersearch-togglelabel' )->isDisabled() ) {
                        // do nothing
-               } elseif ( version_compare( $wgVersion, '1.20', '>=' ) ) {
-                       // In MediaWiki 1.20, this became a lot simpler after
-                       // the main work was passed off to Javascript
+               } else {
                        $out->addHTML(
                                Html::element(
                                        'div',
                                        [ 'id' => 'mw-search-togglebox' ]
                                )
                        );
-               } else { // MW <= 1.19
-                       $out->addHTML(
-                               Xml::tags(
-                                       'div',
-                                       [ 'id' => 'mw-search-togglebox' ],
-                                       Xml::label( $this->msg( 
'powersearch-togglelabel' )->text(), 'mw-search-togglelabel' ) .
-                                       Xml::element(
-                                               'input',
-                                               [
-                                                       'type' => 'button',
-                                                       'id' => 
'mw-search-toggleall',
-                                                       // 'onclick' value 
needed for MW 1.16
-                                                       'onclick' => 
'mwToggleSearchCheckboxes("all");',
-                                                       'value' => $this->msg( 
'powersearch-toggleall' )->text()
-                                               ]
-                                       ) .
-                                       Xml::element(
-                                               'input',
-                                               [
-                                                       'type' => 'button',
-                                                       'id' => 
'mw-search-togglenone',
-                                                       // 'onclick' value 
needed for MW 1.16
-                                                       'onclick' => 
'mwToggleSearchCheckboxes("none");',
-                                                       'value' => $this->msg( 
'powersearch-togglenone' )->text()
-                                               ]
-                                       )
-                               )
-                       );
-               } // end if
+               }
                $out->addHTML(
                        Xml::element( 'div', [ 'class' => 'divider' ], '', 
false ) .
                        "$tables\n</fieldset>"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I103d80348c5ca1db744ae9eb3fae0d6f36001f6e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ReplaceText
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to