r73122 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73121‎ | r73122 | r73123 >
Date:16:40, 16 September 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Cache validity was not considering files without translations
Modified paths:
  • /trunk/extensions/Translate/utils/MessageGroupCache.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/utils/MessageGroupCache.php
@@ -110,7 +110,8 @@
111111
112112 // Timestamp and existence checks
113113 if ( !$this->exists() ) {
114 - return !file_exists( $filename );
 114+ // Cache is valid if the file doesn't exist or doesn't have translations
 115+ return !file_exists( $filename ) || !count( $group->load( $this->code ) );
115116 } elseif ( !file_exists( $filename ) ) {
116117 //$this->delete();
117118 return false;

Status & tagging log