mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 06:13:54 +00:00
Remove usage of deprecated Skin::getRevisionId()
OutputPage has similar method and they are being used interchangeably here. Let's stick with one. Bug: T257992 Change-Id: Ia5a0fbf114f6a1fec6fb85e01a408edae8a5badb
This commit is contained in:
parent
b5a3fa1452
commit
1a45b1409c
|
@ -399,14 +399,15 @@ class SkinMinerva extends SkinTemplate {
|
|||
* @return array
|
||||
*/
|
||||
protected function getHistoryLink( Title $title ) {
|
||||
$isLatestRevision = $this->getRevisionId() === $title->getLatestRevID();
|
||||
$out = $this->getOutput();
|
||||
$isLatestRevision = $out->getRevisionId() === $title->getLatestRevID();
|
||||
// Get rev_timestamp of current revision (preloaded by MediaWiki core)
|
||||
$timestamp = $this->getOutput()->getRevisionTimestamp();
|
||||
$timestamp = $out->getRevisionTimestamp();
|
||||
# No cached timestamp, load it from the database
|
||||
if ( $timestamp === null ) {
|
||||
$timestamp = MediaWikiServices::getInstance()
|
||||
->getRevisionLookup()
|
||||
->getTimestampFromId( $this->getOutput()->getRevisionId() );
|
||||
->getTimestampFromId( $out->getRevisionId() );
|
||||
}
|
||||
|
||||
return !$isLatestRevision || $title->isMainPage() ?
|
||||
|
@ -512,7 +513,7 @@ class SkinMinerva extends SkinTemplate {
|
|||
$this->skinOptions->get( SkinOptions::SIMPLIFIED_TALK ) &&
|
||||
// Only if viewing the latest revision, as we can't get the section numbers otherwise
|
||||
// (and even if we could, they would be useless, because edits often add and remove sections).
|
||||
$this->getRevisionId() === $title->getLatestRevID() &&
|
||||
$this->getOutput()->getRevisionId() === $title->getLatestRevID() &&
|
||||
$title->getContentModel() === CONTENT_MODEL_WIKITEXT;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue