Update user talk on diff-to-current and if the page doesn't exist.
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 3 Aug 2004 04:52:19 +0000 (04:52 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 3 Aug 2004 04:52:19 +0000 (04:52 +0000)
Fixes for:
* [ 711599 ] Viewing current diff of user talk doesn't clear newtalk
* [ 988485 ] Deleted talk page can't clear newtalk

includes/Article.php

index c35e3ed..f14d904 100644 (file)
@@ -655,6 +655,10 @@ class Article {
                        $de = new DifferenceEngine( intval($oldid), intval($diff) );
                        $de->showDiffPage();
                        wfProfileOut( $fname );
+                       if( $diff == 0 ) {
+                               # Run view updates for current revision only
+                               $this->viewUpdates();
+                       }
                        return;
                }
 
@@ -1638,10 +1642,10 @@ class Article {
                                $u = new SiteStatsUpdate( 1, 0, 0 );
                                array_push( $wgDeferredUpdateList, $u );
                        }
-                       $u = new UserTalkUpdate( 0, $this->mTitle->getNamespace(),
-                         $this->mTitle->getDBkey() );
-                       array_push( $wgDeferredUpdateList, $u );
                }
+               $u = new UserTalkUpdate( 0, $this->mTitle->getNamespace(),
+                 $this->mTitle->getDBkey() );
+               array_push( $wgDeferredUpdateList, $u );
        }
 
        # Do standard deferred updates after page edit.