Merge "Rename mw.util.wikiGetlink to getUrl"
[lhc/web/wiklou.git] / includes / WikiPage.php
index 7c3dc93..576979c 100644 (file)
@@ -1134,9 +1134,10 @@ class WikiPage implements Page, IDBAccessObject {
 
        /**
         * Do standard deferred updates after page view
-        * @param $user User The relevant user
+        * @param User $user The relevant user
+        * @param int $oldid The revision id being viewed. If not given or 0, latest revision is assumed.
         */
-       public function doViewUpdates( User $user ) {
+       public function doViewUpdates( User $user, $oldid = 0 ) {
                global $wgDisableCounters;
                if ( wfReadOnly() ) {
                        return;
@@ -1149,7 +1150,7 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                // Update newtalk / watchlist notification status
-               $user->clearNotification( $this->mTitle );
+               $user->clearNotification( $this->mTitle, $oldid );
        }
 
        /**
@@ -2746,6 +2747,9 @@ class WikiPage implements Page, IDBAccessObject {
                $updates = $this->getDeletionUpdates( $content );
                DataUpdate::runUpdates( $updates );
 
+               // Reparse any pages transcluding this page
+               LinksUpdate::queueRecursiveJobsForTable( $this->mTitle, 'templatelinks' );
+
                // Clear caches
                WikiPage::onArticleDelete( $this->mTitle );