* Removed isset() checks - redundant given Parser::version
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 3 Apr 2011 05:53:07 +0000 (05:53 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 3 Apr 2011 05:53:07 +0000 (05:53 +0000)
* 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

index cc24ea6..1ef96a8 100644 (file)
@@ -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.