merging latest master
[lhc/web/wiklou.git] / includes / filerepo / file / LocalFile.php
index 4db1f5f..5a55e43 100644 (file)
@@ -1043,7 +1043,7 @@ class LocalFile extends File {
                if ( !$props ) {
                        wfProfileIn( __METHOD__ . '-getProps' );
                        $props = $this->repo->getFileProps( $this->getVirtualUrl() );
-                       wfProfileOut( __METHOD__ . -'getProps' );
+                       wfProfileOut( __METHOD__ . '-getProps' );
                }
 
                if ( $timestamp === false ) {
@@ -1456,11 +1456,11 @@ class LocalFile extends File {
         */
        function getDescriptionText() {
                global $wgParser;
-               $revision = Revision::newFromTitle( $this->title, false, Revision::AVOID_MASTER );
+               $revision = Revision::newFromTitle( $this->title, false, Revision::READ_NORMAL );
                if ( !$revision ) return false;
-               $text = $revision->getText();
-               if ( !$text ) return false;
-               $pout = $wgParser->parse( $text, $this->title, new ParserOptions() );
+               $content = $revision->getContent();
+               if ( !$content ) return false;
+               $pout = $content->getParserOutput( $this->title, null, new ParserOptions() );
                return $pout->getText();
        }