/** * Do standard deferred updates after page view * @param $user User The relevant user */ public function doViewUpdates( User $user ) { global $wgDisableCounters; if ( wfReadOnly() ) { return; } // Don't update page view counters on views from bot users (bug 14044) if ( !$wgDisableCounters && !$user->isAllowed( 'bot' ) && $this->exists() ) { DeferredUpdates::addUpdate( new ViewCountUpdate( $this->getId() ) ); DeferredUpdates::addUpdate( new SiteStatsUpdate( 1, 0, 0 ) ); } // Update newtalk / watchlist notification status $user->clearNotification( $this->mTitle ); }
/** * Do standard deferred updates after page view (existing or missing page) * @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, $oldid = 0) { global $wgDisableCounters; if (wfReadOnly()) { return; } // Don't update page view counters on views from bot users (bug 14044) if (!$wgDisableCounters && !$user->isAllowed('bot') && $this->exists()) { // Reuben 1/30/2014: Disable view counters because they will be // wildly inaccurate from php-land anyway //DeferredUpdates::addUpdate( new ViewCountUpdate( $this->getId() ) ); //DeferredUpdates::addUpdate( new SiteStatsUpdate( 1, 0, 0 ) ); } // Update newtalk / watchlist notification status $user->clearNotification($this->mTitle, $oldid); }
/** * Do standard deferred updates after page view (existing or missing page) * @param User $user The relevant user * @param int $oldid Revision id being viewed; if not given or 0, latest revision is assumed */ public function doViewUpdates(User $user, $oldid = 0) { if (wfReadOnly()) { return; } Hooks::run('PageViewUpdates', [$this, $user]); // Update newtalk / watchlist notification status try { $user->clearNotification($this->mTitle, $oldid); } catch (DBError $e) { // Avoid outage if the master is not reachable MWExceptionHandler::logException($e); } }
/** * Do standard deferred updates after page view (existing or missing page) * @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, $oldid = 0) { if (wfReadOnly()) { return; } Hooks::run('PageViewUpdates', array($this, $user)); // Update newtalk / watchlist notification status $user->clearNotification($this->mTitle, $oldid); }