Index: trunk/extensions/LiquidThreads/classes/Dispatch.php |
— | — | @@ -21,13 +21,11 @@ |
22 | 22 | return false; |
23 | 23 | } |
24 | 24 | |
25 | | - /** |
26 | | - * Certain actions apply to the "header", which is stored in the actual talkpage |
27 | | - * in the database. Drop everything and behave like a normal page if those |
28 | | - * actions come up, to avoid hacking the various history, editing, etc. code. |
29 | | - */ |
30 | | - $action = $request->getVal( 'action' ); |
31 | | - $header_actions = array( 'history', 'edit', 'submit', 'delete' ); |
| 25 | + global $mediaWiki; |
| 26 | + $action = $mediaWiki->getVal('action'); |
| 27 | + |
| 28 | + // Actions handled by LQT. |
| 29 | + $lqt_actions = array( 'view', 'protect', 'unprotect' ); |
32 | 30 | |
33 | 31 | $lqt_action = $request->getVal( 'lqt_method' ); |
34 | 32 | if ( $action == 'edit' && $request->getVal( 'section' ) == 'new' ) { |
— | — | @@ -36,7 +34,8 @@ |
37 | 35 | $request->setVal( 'section', '' ); |
38 | 36 | |
39 | 37 | $viewname = 'TalkpageView'; |
40 | | - } elseif ( !$lqt_action && ( in_array( $action, $header_actions ) || |
| 38 | + } elseif ( !$lqt_action && ( |
| 39 | + ( !in_array( $action, $lqt_actions ) && $action) || |
41 | 40 | $request->getVal( 'diff', null ) !== null ) ) { |
42 | 41 | // Pass through wrapper |
43 | 42 | $viewname = 'TalkpageHeaderView'; |