r55254 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55253‎ | r55254 | r55255 >
Date:18:27, 18 August 2009
Author:werdna
Status:deferred
Tags:
Comment:
Remove "minor edit" checkbox for posting new threads and replies, it's kinda pointless
Modified paths:
  • /trunk/extensions/LiquidThreads/LiquidThreads.php (modified) (history)
  • /trunk/extensions/LiquidThreads/classes/Hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/LiquidThreads.php
@@ -80,6 +80,9 @@
8181 // Rename
8282 $wgHooks['RenameUserSQL'][] = 'LqtHooks::onUserRename';
8383
 84+// Edit-related
 85+$wgHooks['EditPageBeforeEditChecks'][] = 'LqtHooks::editCheckBoxes';
 86+
8487 // Special pages
8588 $wgSpecialPages['MoveThread'] = 'SpecialMoveThread';
8689 $wgSpecialPages['NewMessages'] = 'SpecialNewMessages';
Index: trunk/extensions/LiquidThreads/classes/Hooks.php
@@ -249,4 +249,15 @@
250250 array( 'th_user_text', 'th_user', 'th_timestamp' );
251251 return true;
252252 }
 253+
 254+ static function editCheckboxes( $editPage, &$checkboxes, &$tabIndex ) {
 255+ $article = $editPage->getArticle();
 256+ $title = $article->getTitle();
 257+
 258+ if ( !$article->exists() && $title->getNamespace() == NS_LQT_THREAD ) {
 259+ unset( $checkboxes['minor'] );
 260+ }
 261+
 262+ return true;
 263+ }
253264 }

Status & tagging log