http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97910

Revision: 97910
Author:   werdna
Date:     2011-09-23 12:24:28 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
LiquidThreads: Make the bump checkbox optional

Modified Paths:
--------------
    trunk/extensions/LiquidThreads/LiquidThreads.php
    trunk/extensions/LiquidThreads/classes/Hooks.php
    trunk/extensions/LiquidThreads/classes/View.php

Modified: trunk/extensions/LiquidThreads/LiquidThreads.php
===================================================================
--- trunk/extensions/LiquidThreads/LiquidThreads.php    2011-09-23 11:58:16 UTC 
(rev 97909)
+++ trunk/extensions/LiquidThreads/LiquidThreads.php    2011-09-23 12:24:28 UTC 
(rev 97910)
@@ -291,3 +291,6 @@
 
 // Namespaces in which to enable LQT
 $wgLqtNamespaces = array();
+
+/** Enable/disable the bump checkbox. **/
+$wgLiquidThreadsShowBumpCheckbox = false;

Modified: trunk/extensions/LiquidThreads/classes/Hooks.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/Hooks.php    2011-09-23 11:58:16 UTC 
(rev 97909)
+++ trunk/extensions/LiquidThreads/classes/Hooks.php    2011-09-23 12:24:28 UTC 
(rev 97910)
@@ -260,7 +260,7 @@
        }
 
        static function editCheckboxes( $editPage, &$checkboxes, &$tabIndex ) {
-               global $wgRequest;
+               global $wgRequest, $wgLiquidThreadsShowBumpCheckbox;
 
                $article = $editPage->getArticle();
                $title = $article->getTitle();
@@ -270,7 +270,9 @@
                        unset( $checkboxes['watch'] );
                }
 
-               if ( $title->getNamespace() == NS_LQT_THREAD && self::$editType 
!= 'new' ) {
+               if ( $title->getNamespace() == NS_LQT_THREAD && self::$editType 
!= 'new' &&
+                       $wgLiquidThreadsShowBumpCheckbox )
+               {
                        $label = wfMsgExt( 'lqt-edit-bump', 'parseinline' );
                        $tooltip = wfMsgExt( 'lqt-edit-bump-tooltip', 
'parsemag' );
 

Modified: trunk/extensions/LiquidThreads/classes/View.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/View.php     2011-09-23 11:58:16 UTC 
(rev 97909)
+++ trunk/extensions/LiquidThreads/classes/View.php     2011-09-23 12:24:28 UTC 
(rev 97910)
@@ -587,7 +587,8 @@
                $e->edit();
 
                if ( $e->didSave ) {
-                       $bump = $this->request->getBool( 'wpBumpThread' );
+                       $bump = !$this->request->getCheck('wpBumpThread') ||
+                               $this->request->getBool( 'wpBumpThread' );
                        $signature = $this->request->getVal( 'wpLqtSignature', 
null );
 
                        $info = array(
@@ -695,7 +696,8 @@
                $e->edit();
 
                if ( $e->didSave ) {
-                       $bump = $this->request->getBool( 'wpBumpThread' );
+                       $bump = !$this->request->getCheck('wpBumpThread') ||
+                               $this->request->getBool( 'wpBumpThread' );
                        $signature = $this->request->getVal( 'wpLqtSignature', 
null );
 
                        LqtView::editMetadataUpdates(
@@ -764,7 +766,8 @@
                $e->edit();
 
                if ( $e->didSave ) {
-                       $bump = $this->request->getBool( 'wpBumpThread' );
+                       $bump = !$this->request->getCheck('wpBumpThread') ||
+                               $this->request->getBool( 'wpBumpThread' );
 
                        LqtView::summarizeMetadataUpdates(
                                array(


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

Reply via email to