Merge "In MediaWikiTestCase::stashMwGlobals(), prefer shallow copies"
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index 82e66aa..8702156 100644 (file)
@@ -94,7 +94,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @param Title $title
         *
         * @throws MWException
-        * @return WikiPage Object of the appropriate type
+        * @return WikiPage|WikiCategoryPage|WikiFilePage
         */
        public static function factory( Title $title ) {
                $ns = $title->getNamespace();
@@ -183,18 +183,12 @@ class WikiPage implements Page, IDBAccessObject {
        }
 
        /**
-        * Returns overrides for action handlers.
-        * Classes listed here will be used instead of the default one when
-        * (and only when) $wgActions[$action] === true. This allows subclasses
-        * to override the default behavior.
-        *
         * @todo Move this UI stuff somewhere else
         *
-        * @return array
+        * @see ContentHandler::getActionOverrides
         */
        public function getActionOverrides() {
-               $content_handler = $this->getContentHandler();
-               return $content_handler->getActionOverrides();
+               return $this->getContentHandler()->getActionOverrides();
        }
 
        /**
@@ -2115,7 +2109,13 @@ class WikiPage implements Page, IDBAccessObject {
                        : '';
                $edit->pst = $edit->pstContent ? $edit->pstContent->serialize( $serialFormat ) : '';
 
+               if ( $edit->output ) {
+                       $edit->output->setCacheTime( wfTimestampNow() );
+               }
+
+               // Process cache the result
                $this->mPreparedEdit = $edit;
+
                return $edit;
        }