Index: trunk/extensions/LiquidThreads/LiquidThreads.php |
— | — | @@ -80,6 +80,9 @@ |
81 | 81 | // Rename |
82 | 82 | $wgHooks['RenameUserSQL'][] = 'LqtHooks::onUserRename'; |
83 | 83 | |
| 84 | +// Edit-related |
| 85 | +$wgHooks['EditPageBeforeEditChecks'][] = 'LqtHooks::editCheckBoxes'; |
| 86 | + |
84 | 87 | // Special pages |
85 | 88 | $wgSpecialPages['MoveThread'] = 'SpecialMoveThread'; |
86 | 89 | $wgSpecialPages['NewMessages'] = 'SpecialNewMessages'; |
Index: trunk/extensions/LiquidThreads/classes/Hooks.php |
— | — | @@ -249,4 +249,15 @@ |
250 | 250 | array( 'th_user_text', 'th_user', 'th_timestamp' ); |
251 | 251 | return true; |
252 | 252 | } |
| 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 | + } |
253 | 264 | } |