r56029 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56028‎ | r56029 | r56030 >
Date:13:23, 8 September 2009
Author:werdna
Status:deferred
Tags:
Comment:
Hijack section=new for talkpage_new_thread
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/Dispatch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/Dispatch.php
@@ -41,7 +41,14 @@
4242 $action = $request->getVal( 'action' );
4343 $header_actions = array( 'history', 'edit', 'submit', 'delete' );
4444 global $wgRequest;
45 - if ( $request->getVal( 'lqt_method', null ) === null &&
 45+ if ($action == 'edit' && $request->getVal('section') == 'new') {
 46+ // Hijack section=new for "new thread".
 47+ $request->setVal( 'lqt_method', 'talkpage_new_thread' );
 48+ $request->setVal( 'section', '' );
 49+
 50+ $viewname = self::$views['TalkpageView'];
 51+
 52+ } elseif ( $request->getVal( 'lqt_method', null ) === null &&
4653 ( in_array( $action, $header_actions ) ||
4754 $request->getVal( 'diff', null ) !== null ) ) {
4855 // Pass through wrapper

Status & tagging log