If timestamp is null load revision time
Passing null to wfTimestamp will result in the current time. Protect against that happening Bug: T180103 Change-Id: I6ef9577bf52609bf387b0146f1d8a4a53be58cd7
This commit is contained in:
parent
d0938de871
commit
8eb65b264d
@ -729,6 +729,11 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
|
|||||||
$isMainPage = $title->isMainPage();
|
$isMainPage = $title->isMainPage();
|
||||||
// Get rev_timestamp of current revision (preloaded by MediaWiki core)
|
// Get rev_timestamp of current revision (preloaded by MediaWiki core)
|
||||||
$timestamp = $this->getOutput()->getRevisionTimestamp();
|
$timestamp = $this->getOutput()->getRevisionTimestamp();
|
||||||
|
# No cached timestamp, load it from the database
|
||||||
|
if ( $timestamp === null ) {
|
||||||
|
$timestamp = Revision::getTimestampFromId( $this->getTitle(), $this->getRevisionId() );
|
||||||
|
}
|
||||||
|
|
||||||
// Main pages tend to include transclusions (see bug 51924)
|
// Main pages tend to include transclusions (see bug 51924)
|
||||||
if ( $isMainPage ) {
|
if ( $isMainPage ) {
|
||||||
$lastModified = $this->msg( 'mobile-frontend-history' )->plain();
|
$lastModified = $this->msg( 'mobile-frontend-history' )->plain();
|
||||||
|
Loading…
Reference in New Issue
Block a user