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

Change subject: Switch from deprecated EditPageBeforeEditChecks to 
EditPageGetCheckboxesDefinition
......................................................................


Switch from deprecated EditPageBeforeEditChecks to 
EditPageGetCheckboxesDefinition

Bug: T161811
Change-Id: Iab8b22e4928612e525a899003f0384e14e55b815
---
M classes/Hooks.php
M extension.json
2 files changed, 10 insertions(+), 17 deletions(-)

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



diff --git a/classes/Hooks.php b/classes/Hooks.php
index 18aebbc..99b01dd 100644
--- a/classes/Hooks.php
+++ b/classes/Hooks.php
@@ -307,9 +307,10 @@
        }
 
        /**
+        * Handle EditPageGetCheckboxesDefinition hook
+        *
         * @param $editPage EditPage
         * @param $checkboxes
-        * @param $tabIndex
         * @return bool
         */
        static function editCheckboxes( $editPage, &$checkboxes, &$tabIndex ) {
@@ -326,21 +327,13 @@
                if ( $title->getNamespace() == NS_LQT_THREAD && self::$editType 
!= 'new' &&
                        $wgLiquidThreadsShowBumpCheckbox )
                {
-                       $label = wfMessage( 'lqt-edit-bump' )->parse();
-                       $tooltip = wfMessage( 'lqt-edit-bump-tooltip' )->text();
-
-                       $checked = ! $wgRequest->wasPosted() ||
-                                       $wgRequest->getBool( 'wpBumpThread' );
-
-                       $html =
-                               Xml::check( 'wpBumpThread', $checked, array(
-                                               'title' => $tooltip, 'id' => 
'wpBumpThread'
-                                       ) );
-
-                       $html .= Xml::tags( 'label', array( 'for' => 
'wpBumpThread',
-                                       'title' => $tooltip ), $label );
-
-                       $checkboxes['bump'] = $html;
+                       $checkboxes['wpBumpThread'] = [
+                               'id' => 'wpBumpThread',
+                               'label-message' => 'lqt-edit-bump',
+                               'title-message' => 'lqt-edit-bump-tooltip',
+                               'legacy-name' => 'bump',
+                               'default' => !$wgRequest->wasPosted() || 
$wgRequest->getBool( 'wpBumpThread' ),
+                       ];
                }
 
                return true;
diff --git a/extension.json b/extension.json
index 5f267ea..981a857 100644
--- a/extension.json
+++ b/extension.json
@@ -297,7 +297,7 @@
                "UserMergeAccountFields": [
                        "LqtHooks::onUserMergeAccountFields"
                ],
-               "EditPageBeforeEditChecks": [
+               "EditPageGetCheckboxesDefinition": [
                        "LqtHooks::editCheckBoxes"
                ],
                "PageContentSaveComplete": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab8b22e4928612e525a899003f0384e14e55b815
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Jforrester <[email protected]>
Gerrit-Reviewer: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to