Add SpecialPage::getConfig
authorKunal Mehta <legoktm@gmail.com>
Tue, 3 Jun 2014 22:14:22 +0000 (15:14 -0700)
committerKunal Mehta <legoktm@gmail.com>
Tue, 3 Jun 2014 22:14:22 +0000 (15:14 -0700)
This is necessary since SpecialPage doesn't extend ContextSource yet.

Change-Id: I94c28dc88e9eb569eec5c5ab6e2ce97acc6a25e3

includes/specialpage/SpecialPage.php

index 82d6177..7ec9f4a 100644 (file)
@@ -580,6 +580,15 @@ class SpecialPage {
                return $this->getContext()->getLanguage();
        }
 
+       /**
+        * Shortcut to get main config object
+        * @return Config
+        * @since 1.24
+        */
+       public function getConfig() {
+               return $this->getContext()->getConfig();
+       }
+
        /**
         * Return the full title, including $par
         *