http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72492
Revision: 72492
Author: werdna
Date: 2010-09-06 13:21:40 +0000 (Mon, 06 Sep 2010)
Log Message:
-----------
Re-work interception of LQT actions. Resolves bug 23716
Modified Paths:
--------------
trunk/extensions/LiquidThreads/classes/Dispatch.php
Modified: trunk/extensions/LiquidThreads/classes/Dispatch.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/Dispatch.php 2010-09-06 13:17:10 UTC
(rev 72491)
+++ trunk/extensions/LiquidThreads/classes/Dispatch.php 2010-09-06 13:21:40 UTC
(rev 72492)
@@ -21,13 +21,11 @@
return false;
}
- /**
- * Certain actions apply to the "header", which is stored in
the actual talkpage
- * in the database. Drop everything and behave like a normal
page if those
- * actions come up, to avoid hacking the various history,
editing, etc. code.
- */
- $action = $request->getVal( 'action' );
- $header_actions = array( 'history', 'edit', 'submit', 'delete'
);
+ global $mediaWiki;
+ $action = $mediaWiki->getVal('action');
+
+ // Actions handled by LQT.
+ $lqt_actions = array( 'view', 'protect', 'unprotect' );
$lqt_action = $request->getVal( 'lqt_method' );
if ( $action == 'edit' && $request->getVal( 'section' ) ==
'new' ) {
@@ -36,7 +34,8 @@
$request->setVal( 'section', '' );
$viewname = 'TalkpageView';
- } elseif ( !$lqt_action && ( in_array( $action, $header_actions
) ||
+ } elseif ( !$lqt_action && (
+ ( !in_array( $action, $lqt_actions ) &&
$action) ||
$request->getVal( 'diff', null ) !== null ) ) {
// Pass through wrapper
$viewname = 'TalkpageHeaderView';
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs