* Get the last modification timestamp of the message blob for this
* module in a given language.
* @param $lang String: Language code
- * @return Integer: UNIX timestamp, or 0 if no blob found
+ * @return Integer: UNIX timestamp, or 0 if the module doesn't have messages
*/
public function getMsgBlobMtime( $lang ) {
if ( !isset( $this->msgBlobMtime[$lang] ) ) {
'mr_lang' => $lang
), __METHOD__
);
- $this->msgBlobMtime[$lang] = $msgBlobMtime ? wfTimestamp( TS_UNIX, $msgBlobMtime ) : 0;
+ // If no blob was found, but the module does have messages, that means we need
+ // to regenerate it. Return NOW
+ if ( !$msgBlobMtime ) {
+ $msgBlobMtime = wfTimestamp( TS_UNIX );
+ }
+ $this->msgBlobMtime[$lang] = wfTimestamp( TS_UNIX, $msgBlobMtime );
}
return $this->msgBlobMtime[$lang];
}