ImagePage: Inherit parent's handling for action=render
[lhc/web/wiklou.git] / includes / page / ImagePage.php
index bf3eaf4..1773e16 100644 (file)
@@ -86,18 +86,15 @@ class ImagePage extends Article {
                $this->repo = $img->getRepo();
        }
 
-       /**
-        * Handler for action=render
-        * Include body text only; none of the image extras
-        */
-       public function render() {
-               $this->getContext()->getOutput()->setArticleBodyOnly( true );
-               parent::view();
-       }
-
        public function view() {
                global $wgShowEXIF;
 
+               // For action=render, include body text only; none of the image extras
+               if ( $this->viewIsRenderAction ) {
+                       parent::view();
+                       return;
+               }
+
                $out = $this->getContext()->getOutput();
                $request = $this->getContext()->getRequest();
                $diff = $request->getVal( 'diff' );