From: Alexandre Emsenhuber Date: Tue, 26 Aug 2014 21:02:16 +0000 (+0200) Subject: Use Config instead of globals in CategoryViewer.php X-Git-Tag: 1.31.0-rc.0~14267 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=1998e3ed02de8e45ab9a99dc77cb6461b81b016a;p=lhc%2Fweb%2Fwiklou.git Use Config instead of globals in CategoryViewer.php Change-Id: If33619694f1cf298b356a1761e454e274fe6aa5c --- diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index ec8efae7b7..60694c95e3 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -87,12 +87,11 @@ class CategoryViewer extends ContextSource { function __construct( $title, IContextSource $context, $from = array(), $until = array(), $query = array() ) { - global $wgCategoryPagingLimit; $this->title = $title; $this->setContext( $context ); $this->from = $from; $this->until = $until; - $this->limit = $wgCategoryPagingLimit; + $this->limit = $context->getConfig()->get( 'CategoryPagingLimit' ); $this->cat = Category::newFromTitle( $title ); $this->query = $query; $this->collation = Collation::singleton(); @@ -105,10 +104,10 @@ class CategoryViewer extends ContextSource { * @return string HTML output */ public function getHTML() { - global $wgCategoryMagicGallery; wfProfileIn( __METHOD__ ); - $this->showGallery = $wgCategoryMagicGallery && !$this->getOutput()->mNoGallery; + $this->showGallery = $this->getConfig()->get( 'CategoryMagicGallery' ) + && !$this->getOutput()->mNoGallery; $this->clearCategoryState(); $this->doCategoryQuery();