Tweak comment; people seem to whine about this one, not reading past the mt_rand...
authorRob Church <robchurch@users.mediawiki.org>
Wed, 22 Aug 2007 07:24:30 +0000 (07:24 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 22 Aug 2007 07:24:30 +0000 (07:24 +0000)
includes/Article.php

index 32ce420..5bb5915 100644 (file)
@@ -2403,12 +2403,11 @@ class Article {
                $u = new LinksUpdate( $this->mTitle, $poutput );
                $u->doUpdate();
 
-               if ( wfRunHooks( 'ArticleEditUpdatesDeleteFromRecentchanges', array( &$this ) ) ) {
-                       wfSeedRandom();
+               if( wfRunHooks( 'ArticleEditUpdatesDeleteFromRecentchanges', array( &$this ) ) ) {
                        if ( 0 == mt_rand( 0, 99 ) ) {
-                               # Periodically flush old entries from the recentchanges table.
+                               // Flush old entries from the `recentchanges` table; we do this on
+                               // random requests so as to avoid an increase in writes for no good reason
                                global $wgRCMaxAge;
-
                                $dbw = wfGetDB( DB_MASTER );
                                $cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
                                $recentchanges = $dbw->tableName( 'recentchanges' );