BUG#1402 Make link color of tab subject page link on talk page indicate whether artic...
[lhc/web/wiklou.git] / includes / Article.php
index 56055cc..48d0b85 100644 (file)
@@ -1040,7 +1040,7 @@ class Article {
                        $u->doUpdate();
                }
 
-               $this->showArticle( $text, wfMsg( 'updated' ), $sectionanchor, $me2, $now, $summary, $revisionId );
+               $this->showArticle( $text, wfMsg( 'updated' ), $sectionanchor, $me2, $now, $summary, $lastRevision );
                }
                return $good;
        }
@@ -1815,8 +1815,10 @@ class Article {
 
                wfSeedRandom();
                if ( 0 == mt_rand( 0, 999 ) ) {
+                       # Periodically flush old entries from the recentchanges table.
+                       global $wgRCMaxAge;
                        $dbw =& wfGetDB( DB_MASTER );
-                       $cutoff = $dbw->timestamp( time() - ( 7 * 86400 ) );
+                       $cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
                        $sql = "DELETE FROM recentchanges WHERE rc_timestamp < '{$cutoff}'";
                        $dbw->query( $sql );
                }