Merge "Followup I4049b666: "Removing prefix exception for HTMLCheckMatrix""
[lhc/web/wiklou.git] / includes / specials / SpecialRandomInCategory.php
index e877b4e..28a1bc5 100644 (file)
@@ -68,8 +68,6 @@ class SpecialRandomInCategory extends SpecialPage {
        }
 
        public function execute( $par ) {
-               global $wgScript;
-
                $cat = false;
 
                $categoryStr = $this->getRequest()->getText( 'category', $par );
@@ -100,7 +98,7 @@ class SpecialRandomInCategory extends SpecialPage {
                        $submit = Html::input( '', $submitText, 'submit' );
 
                        $msg = $this->msg( 'randomincategory-selectcategory' );
-                       $form = Html::rawElement( 'form', array( 'action' => $wgScript ),
+                       $form = Html::rawElement( 'form', array( 'action' => wfScript() ),
                                Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) .
                                $msg->rawParams( $input, $submit )->parse()
                        );
@@ -127,7 +125,7 @@ class SpecialRandomInCategory extends SpecialPage {
 
        /**
         * Choose a random title.
-        * @return Title object (or null if nothing to choose from)
+        * @return Title|null Title object (or null if nothing to choose from)
         */
        public function getRandomTitle() {
                // Convert to float, since we do math with the random number.
@@ -177,7 +175,7 @@ class SpecialRandomInCategory extends SpecialPage {
         *   was a large gap in the distribution of cl_timestamp values. This way instead
         *   of things to the right of the gap being favoured, both sides of the gap
         *   are favoured.
-        * @return Array Query information.
+        * @return array Query information.
         */
        protected function getQueryInfo( $rand, $offset, $up ) {
                $op = $up ? '>=' : '<=';
@@ -238,8 +236,8 @@ class SpecialRandomInCategory extends SpecialPage {
         * Get the lowest and highest timestamp for a category.
         *
         * @param Title $category
-        * @return Array The lowest and highest timestamp
-        * @throws MWException if category has no entries.
+        * @return array The lowest and highest timestamp
+        * @throws MWException If category has no entries.
         */
        protected function getMinAndMaxForCat( Title $category ) {
                $dbr = wfGetDB( DB_SLAVE );
@@ -268,8 +266,8 @@ class SpecialRandomInCategory extends SpecialPage {
         * @param float $rand A random number that is converted to a random timestamp
         * @param int $offset A small offset to make the result seem more "random"
         * @param bool $up Get the result above the random value
-        * @param String $fname The name of the calling method
-        * @return Array Info for the title selected.
+        * @param string $fname The name of the calling method
+        * @return array Info for the title selected.
         */
        private function selectRandomPageFromDB( $rand, $offset, $up, $fname = __METHOD__ ) {
                $dbr = wfGetDB( DB_SLAVE );