Get file from WikiFilePage, instead of ImagePage
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 6 Feb 2016 22:08:26 +0000 (23:08 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 6 Feb 2016 22:08:26 +0000 (23:08 +0100)
Change-Id: Ib28354fde2dc084ae9aff8cfa960785bb2012933

includes/page/ImageHistoryList.php
includes/page/ImageHistoryPseudoPager.php

index 32638a5..4c36729 100644 (file)
@@ -53,7 +53,7 @@ class ImageHistoryList extends ContextSource {
         */
        public function __construct( $imagePage ) {
                global $wgShowArchiveThumbnails;
-               $this->current = $imagePage->getFile();
+               $this->current = $imagePage->getPage()->getFile();
                $this->img = $imagePage->getDisplayedFile();
                $this->title = $imagePage->getTitle();
                $this->imagePage = $imagePage;
index e421d23..f541387 100644 (file)
@@ -111,7 +111,7 @@ class ImageHistoryPseudoPager extends ReverseChronologicalPager {
                if ( $this->mQueryDone ) {
                        return;
                }
-               $this->mImg = $this->mImagePage->getFile(); // ensure loading
+               $this->mImg = $this->mImagePage->getPage()->getFile(); // ensure loading
                if ( !$this->mImg->exists() ) {
                        return;
                }