aboutsummaryrefslogtreecommitdiffstats
path: root/includes/OutputPage.php
diff options
context:
space:
mode:
authorPiotr Miazga <piotr@polishdeveloper.pl>2019-08-21 14:10:09 +0200
committerKrinkle <krinklemail@gmail.com>2019-08-23 13:21:11 +0000
commitb7204566d2e6b3d7631d0e304b3282c49a5b500d (patch)
treef5cccf0c16e674a88ecf7400571a3c0b88678f58 /includes/OutputPage.php
parent8390e37efc4b42a1ba3d3102bd78208a30cfccf2 (diff)
downloadmediawikicore-b7204566d2e6b3d7631d0e304b3282c49a5b500d.tar.gz
mediawikicore-b7204566d2e6b3d7631d0e304b3282c49a5b500d.zip
Deprecate skin functions that are not skin responsibilities
Skin shouldn't be responsible for providing requested revisionId nor if that revision is the current revision. The OutputPage object has all required information (both the currentRevisionID and the current Title object). Change-Id: I2dbae4c6968a2b3b3cea3e09977e9579609b4cc5
Diffstat (limited to 'includes/OutputPage.php')
-rw-r--r--includes/OutputPage.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index f8b7502710b7..3f2dcf7f4b79 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1662,6 +1662,16 @@ class OutputPage extends ContextSource {
}
/**
+ * Whether the revision displayed is the latest revision of the page
+ *
+ * @since 1.34
+ * @return bool
+ */
+ public function isRevisionCurrent() {
+ return $this->mRevisionId == 0 || $this->mRevisionId == $this->getTitle()->getLatestRevID();
+ }
+
+ /**
* Set the timestamp of the revision which will be displayed. This is used
* to avoid a extra DB call in Skin::lastModified().
*