http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72490

Revision: 72490
Author:   werdna
Date:     2010-09-06 13:05:45 +0000 (Mon, 06 Sep 2010)

Log Message:
-----------
Unmerge r72489, because it included some unrelated changes

Modified Paths:
--------------
    trunk/extensions/LiquidThreads/classes/Dispatch.php
    trunk/extensions/LiquidThreads/classes/Thread.php
    trunk/extensions/LiquidThreads/classes/View.php

Modified: trunk/extensions/LiquidThreads/classes/Dispatch.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/Dispatch.php 2010-09-06 12:59:42 UTC 
(rev 72489)
+++ trunk/extensions/LiquidThreads/classes/Dispatch.php 2010-09-06 13:05:45 UTC 
(rev 72490)
@@ -21,11 +21,13 @@
                        return false;
                }
 
-               global $mediaWiki;
-               $action = $mediaWiki->getVal('action');
-               
-               // Actions handled by LQT.
-               $lqt_actions = array( 'view', 'protect', 'unprotect' );
+               /**
+                * 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' 
);
 
                $lqt_action = $request->getVal( 'lqt_method' );
                if ( $action == 'edit' && $request->getVal( 'section' ) == 
'new' ) {
@@ -34,8 +36,7 @@
                        $request->setVal( 'section', '' );
 
                        $viewname = 'TalkpageView';
-               } elseif ( !$lqt_action && (
-                               ( !in_array( $action, $lqt_actions ) && 
$action) ||
+               } elseif ( !$lqt_action && ( in_array( $action, $header_actions 
) ||
                                $request->getVal( 'diff', null ) !== null ) ) {
                        // Pass through wrapper
                        $viewname = 'TalkpageHeaderView';

Modified: trunk/extensions/LiquidThreads/classes/Thread.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/Thread.php   2010-09-06 12:59:42 UTC 
(rev 72489)
+++ trunk/extensions/LiquidThreads/classes/Thread.php   2010-09-06 13:05:45 UTC 
(rev 72490)
@@ -324,9 +324,9 @@
        }
 
        function delete( $reason, $commit = true ) {
-               $this->type = Threads::TYPE_DELETED;
-               
+       
                if ( $commit ) {
+                       $this->type = Threads::TYPE_DELETED;
                        $this->commitRevision( Threads::CHANGE_DELETED, $this, 
$reason );
                }
                /* Mark thread as read by all users, or we get blank thingies 
in New Messages. */
@@ -1158,11 +1158,7 @@
                        }
 
                        if ( !$title && $this->type() != Threads::TYPE_DELETED 
) {
-                               if ( ! $this->isHistorical() ) {
-                                       $this->delete('', false /* !commit */);
-                               } else {
-                                       $this->type = Threads::TYPE_DELETED;
-                               }
+                               $this->delete('', false /* !commit */);
                        }
                        
                        if ( !$title ) {

Modified: trunk/extensions/LiquidThreads/classes/View.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/View.php     2010-09-06 12:59:42 UTC 
(rev 72489)
+++ trunk/extensions/LiquidThreads/classes/View.php     2010-09-06 13:05:45 UTC 
(rev 72490)
@@ -1279,6 +1279,7 @@
                // Remove title, so that it stays set correctly.
                $parserOutput->setTitleText( '' );
 
+
                $wgOut->addParserOutputNoText( $parserOutput );
 
                return $parserOutput->getText();



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to