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

Revision: 89547
Author:   krinkle
Date:     2011-06-06 00:32:03 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
Use tokens where needed for WatchAction (as of r89545)
* ./MultilingualLiquidThreads/LiquidThreads/classes/Thread.php
* ./extensions/LiquidThreads/classes/Thread.php
* ./extensions/MetavidWiki/includes/articlepages/MV_DataPage.php
** MV_DataPage.php: Per r86041 I replaced the second watch-call in 
MV_DataPage.php with an unwatch call.
* ./extensions/ReplaceText/ReplaceTextJob.php

Modified Paths:
--------------
    trunk/extensions/LiquidThreads/classes/Thread.php
    trunk/extensions/MetavidWiki/includes/articlepages/MV_DataPage.php
    trunk/extensions/MultilingualLiquidThreads/LiquidThreads/classes/Thread.php
    trunk/extensions/ReplaceText/ReplaceTextJob.php

Modified: trunk/extensions/LiquidThreads/classes/Thread.php
===================================================================
--- trunk/extensions/LiquidThreads/classes/Thread.php   2011-06-06 00:12:45 UTC 
(rev 89546)
+++ trunk/extensions/LiquidThreads/classes/Thread.php   2011-06-06 00:32:03 UTC 
(rev 89547)
@@ -112,7 +112,7 @@
                NewMessages::writeMessageStateForUpdatedThread( $thread, 
$change_type, $wgUser );
 
                if ( $wgUser->getOption( 'lqt-watch-threads', false ) ) {
-                       Action::factory( 'watch', 
$thread->topmostThread()->root() )->execute();
+                       WatchAction:doWatch( 
$thread->topmostThread()->root()->getTitle(), $wgUser );
                }
 
                return $thread;

Modified: trunk/extensions/MetavidWiki/includes/articlepages/MV_DataPage.php
===================================================================
--- trunk/extensions/MetavidWiki/includes/articlepages/MV_DataPage.php  
2011-06-06 00:12:45 UTC (rev 89546)
+++ trunk/extensions/MetavidWiki/includes/articlepages/MV_DataPage.php  
2011-06-06 00:32:03 UTC (rev 89547)
@@ -63,9 +63,9 @@
                if ( $confirm ) {
                        $this->doDelete( $reason );
                        if ( $wgRequest->getCheck( 'wpWatch' ) ) {
-                               Action::factory( 'watch', $this )->execute();
+                               WatchAction:doWatch( $this->mTitle, $wgUser );
                        } elseif ( $this->mTitle->userIsWatching() ) {
-                               Action::factory( 'watch', $this )->execute();
+                               WatchAction:doUnwatch( $this->mTitle, $wgUser );
                        }
                        return;
                }

Modified: 
trunk/extensions/MultilingualLiquidThreads/LiquidThreads/classes/Thread.php
===================================================================
--- trunk/extensions/MultilingualLiquidThreads/LiquidThreads/classes/Thread.php 
2011-06-06 00:12:45 UTC (rev 89546)
+++ trunk/extensions/MultilingualLiquidThreads/LiquidThreads/classes/Thread.php 
2011-06-06 00:32:03 UTC (rev 89547)
@@ -113,7 +113,7 @@
                NewMessages::writeMessageStateForUpdatedThread( $thread, 
$change_type, $wgUser );
 
                if ( $wgUser->getOption( 'lqt-watch-threads', false ) ) {
-                       Action::factory( 'watch', 
$thread->topmostThread()->root() )->execute();
+                       WatchAction:doWatch( 
$thread->topmostThread()->root()->getTitle(), $wgUser );
                }
 
                return $thread;
@@ -1095,7 +1095,7 @@
        }
 
        // The 'root' is the page in the Thread namespace corresponding to this 
thread.
-       function root( ) {
+       function root() {
                if ( !$this->rootId ) return null;
                if ( !$this->root ) {
                        if ( isset( self::$articleCacheById[$this->rootId] ) ) {

Modified: trunk/extensions/ReplaceText/ReplaceTextJob.php
===================================================================
--- trunk/extensions/ReplaceText/ReplaceTextJob.php     2011-06-06 00:12:45 UTC 
(rev 89546)
+++ trunk/extensions/ReplaceText/ReplaceTextJob.php     2011-06-06 00:32:03 UTC 
(rev 89547)
@@ -42,7 +42,7 @@
                        $create_redirect = $this->params['create_redirect'];
                        $this->title->moveTo( $new_title, true, $reason, 
$create_redirect );
                        if ( $this->params['watch_page'] ) {
-                               Action::factory( 'watch', new Article( 
$new_title, 0 ) )->execute();
+                               WatchAction::doWatch( $new_title, $wgUser );
                        }
                        $wgUser = $actual_user;
                } else {


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

Reply via email to