* Marking edits as bot edits with Special:Contributions?bot=1 now requires the
markbotedit permission, rather than the rollback permission previously used.
This permission is assigned by default to the sysop group.
+* MediaWiki now checks if serialized files are out of date. New configuration
+ variable $wgCheckSerialized can be set to false to enable old behavior (i.e.
+ to not check and assume they are always up to date)
=== New features in 1.12 ===
* (bug 10735) Add a warning for non-descriptive filenames at Special:Upload
* (bug 9633) Add a predefined list of delete reasons to the deletion form
* Show a warning message when creating/editing a user (talk) page but the user
does not exists
+* (bug 8396) Ignore out-of-date serialised message caches
=== Bug fixes in 1.12 ===
*/
$wgMaxMsgCacheEntrySize = 10000;
+/**
+ * Set to false if you are thorough system admin who always remembers to keep
+ * serialized files up to date to save few mtime calls.
+ */
+$wgCheckSerialized = true;
+
# Whether to enable language variant conversion.
$wgDisableLangConversion = false;
*/
static function loadLocalisation( $code, $disableCache = false ) {
static $recursionGuard = array();
- global $wgMemc;
+ global $wgMemc, $wgCheckSerialized;
if ( !$code ) {
throw new MWException( "Invalid language code requested" );
# Try the serialized directory
$cache = wfGetPrecompiledData( self::getFileName( "Messages", $code, '.ser' ) );
if ( $cache ) {
- self::$mLocalisationCache[$code] = $cache;
- wfDebug( "Language::loadLocalisation(): got localisation for $code from precompiled data file\n" );
- wfProfileOut( __METHOD__ );
- return self::$mLocalisationCache[$code]['deps'];
+ if ( $wgCheckSerialized && self::isLocalisationOutOfDate( $cache ) ) {
+ $cache = false;
+ wfDebug( "Language::loadLocalisation(): precompiled data file for $code is out of date\n" );
+ } else {
+ self::$mLocalisationCache[$code] = $cache;
+ wfDebug( "Language::loadLocalisation(): got localisation for $code from precompiled data file\n" );
+ wfProfileOut( __METHOD__ );
+ return self::$mLocalisationCache[$code]['deps'];
+ }
}
# Try the global cache