Lagged slave warning
authorTim Starling <tstarling@users.mediawiki.org>
Sat, 15 Jan 2005 10:40:46 +0000 (10:40 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Sat, 15 Jan 2005 10:40:46 +0000 (10:40 +0000)
includes/Skin.php
languages/Language.php

index 14bb190..ea29fd8 100644 (file)
@@ -832,7 +832,7 @@ class Skin extends Linker {
        }
 
        function lastModified() {
-               global $wgLang, $wgArticle;
+               global $wgLang, $wgArticle, $wgLoadBalancer;
 
                $timestamp = $wgArticle->getTimestamp();
                if ( $timestamp ) {
@@ -841,6 +841,9 @@ class Skin extends Linker {
                } else {
                        $s = '';
                }
+               if ( $wgLoadBalancer->getLaggedSlaveMode() ) {
+                       $s .= ' <strong>' . wfMsg( 'laggedslavemode' ) . '</strong>';
+               }
                return $s;
        }
 
index 7192d9a..c93bc32 100644 (file)
@@ -491,6 +491,7 @@ MySQL returned error \"$3: $4\".\n",
 $1',
 'nodb'                 => "Could not select database $1",
 'cachederror'          => 'The following is a cached copy of the requested page, and may not be up to date.',
+'laggedslave'   => 'Warning: Page may not contain recent updates.',
 'readonly'             => 'Database locked',
 'enterlockreason' => 'Enter a reason for the lock, including an estimate
 of when the lock will be released',