From ed303469fe489c8d1d64cf638c01aae31be34aa5 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 3 Apr 2011 05:53:07 +0000 Subject: [PATCH] * Removed isset() checks - redundant given Parser::version * For sanity in insertOn(), if the template/file version arrays are null, don't hit the DB - just assume they are empty * Refactored mFlags handling in FlaggedRevision * Use accessors for ParserOutput template/file versions * Added OutputPage accessors for template/file versions * Changed instance of NS_IMAGE -> NS_FILE --- includes/OutputPage.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index cc24ea661c..1ef96a8a84 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1265,6 +1265,24 @@ class OutputPage { return $this->mRevisionId; } + /** + * Get the templates used on this page + * + * @return Array (namespace => dbKey => revId) + */ + public function getTemplateIds() { + return $this->mTemplateIds; + } + + /** + * Get the files used on this page + * + * @return Array (dbKey => array('time' => MW timestamp or null, 'sha1' => sha1 or '')) + */ + public function getImageTimeKeys() { + return $this->mImageTimeKeys; + } + /** * Convert wikitext to HTML and add it to the buffer * Default assumes that the current page title will be used. -- 2.20.1