Set correct context for ImageHistoryPseudoPager
authorumherirrender <umherirrender_de.wp@web.de>
Sun, 9 Dec 2012 18:12:42 +0000 (19:12 +0100)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 20 Dec 2012 19:21:15 +0000 (19:21 +0000)
ContextSource::getContext (ImageHistoryPseudoPager): called and $context
is null. Using RequestContext::getMain() for sanity

Change-Id: I0430791a705f42ca3e5d02692070f0fb0dadc897

includes/ImagePage.php

index ecf4f89..c831f64 100644 (file)
@@ -1225,7 +1225,7 @@ class ImageHistoryPseudoPager extends ReverseChronologicalPager {
         * @param ImagePage $imagePage
         */
        function __construct( $imagePage ) {
-               parent::__construct();
+               parent::__construct( $imagePage->getContext() );
                $this->mImagePage = $imagePage;
                $this->mTitle = clone ( $imagePage->getTitle() );
                $this->mTitle->setFragment( '#filehistory' );