Move functions to better place in Special:Search
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 23 Nov 2013 17:54:17 +0000 (18:54 +0100)
committerIAlex <codereview@emsenhuber.ch>
Sun, 15 Dec 2013 20:46:14 +0000 (20:46 +0000)
The function direct behind the variable definition is not the prefer
place.

Change-Id: I9183e1f1af22644a4f811657fbf2245a11b48854

includes/specials/SpecialSearch.php

index 3d23884..b6b219f 100644 (file)
@@ -37,7 +37,6 @@ class SpecialSearch extends SpecialPage {
         * null|string
         */
        protected $profile;
-       function getProfile() { return $this->profile; }
 
        /// Search engine
        protected $searchEngine;
@@ -60,7 +59,6 @@ class SpecialSearch extends SpecialPage {
         * @var array
         */
        protected $namespaces;
-       function getNamespaces() { return $this->namespaces; }
 
        /**
         * @var bool
@@ -1189,6 +1187,22 @@ class SpecialSearch extends SpecialPage {
                return $this->searchEngine;
        }
 
+       /**
+        * Current search profile.
+        * @return null|string
+        */
+       function getProfile() {
+               return $this->profile;
+       }
+
+       /**
+        * Current namespaces.
+        * @return array
+        */
+       function getNamespaces() {
+               return $this->namespaces;
+       }
+
        /**
         * Users of hook SpecialSearchSetupEngine can use this to
         * add more params to links to not lose selection when