Update documentation
authorSam Reed <reedy@users.mediawiki.org>
Fri, 28 Oct 2011 18:10:41 +0000 (18:10 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Fri, 28 Oct 2011 18:10:41 +0000 (18:10 +0000)
Fix some context method calls which were considered deprecated

includes/api/ApiFormatWddx.php
includes/api/ApiParse.php
includes/api/ApiQuery.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryInfo.php
includes/api/ApiQueryUserContributions.php

index f5cace2..77fb4cd 100644 (file)
@@ -69,6 +69,8 @@ class ApiFormatWddx extends ApiFormatBase {
 
        /**
         * Recursively go through the object and output its data in WDDX format.
+        * @param $elemValue
+        * @param $indent int
         */
        function slowWddxPrinter( $elemValue, $indent = 0 ) {
                $indstr = ( $this->getIsHtml() ? '' : str_repeat( ' ', $indent ) );
index cfc2fb2..b1e344c 100644 (file)
@@ -259,7 +259,7 @@ class ApiParse extends ApiBase {
                }
 
                if ( isset( $prop['headitems'] ) || isset( $prop['headhtml'] ) ) {
-                       $context = $this->createContext();
+                       $context = $this->getContext();
                        $context->setTitle( $titleObj );
                        $context->getOutput()->addParserOutputNoText( $p_result );
 
@@ -382,7 +382,7 @@ class ApiParse extends ApiBase {
        }
 
        private function categoriesHtml( $categories ) {
-               $context = $this->createContext();
+               $context = $this->getContext();
                $context->getOutput()->addCategoryLinks( $categories );
                return $context->getSkin()->getCategories();
        }
index d0803f1..edeb9c8 100644 (file)
@@ -281,6 +281,8 @@ class ApiQuery extends ApiBase {
         * The cache mode may increase in the level of privacy, but public modules
         * added to private data do not decrease the level of privacy.
         *
+        * @param $cacheMode string
+        * @param $modCacheMode string
         * @return string
         */
        protected function mergeCacheMode( $cacheMode, $modCacheMode ) {
index aa0cb36..daadcaa 100644 (file)
@@ -55,6 +55,7 @@ abstract class ApiQueryBase extends ApiBase {
         * Public caching will only be allowed if *all* the modules that supply
         * data for a given request return a cache mode of public.
         *
+        * @param $params
         * @return string
         */
        public function getCacheMode( $params ) {
@@ -220,14 +221,20 @@ abstract class ApiQueryBase extends ApiBase {
                        }
                }
        }
+
        /**
         * Add a WHERE clause corresponding to a range, similar to addWhereRange,
         * but converts $start and $end to database timestamps.
         * @see addWhereRange
+        * @param $field
+        * @param $dir
+        * @param $start
+        * @param $end
+        * @param $sort bool
         */
        protected function addTimestampWhereRange( $field, $dir, $start, $end, $sort = true ) {
                $db = $this->getDb();
-               return $this->addWhereRange( $field, $dir, 
+               return $this->addWhereRange( $field, $dir,
                        $db->timestampOrNull( $start ), $db->timestampOrNull( $end ), $sort );
        }
 
index fe98bb3..2d42d1a 100644 (file)
@@ -76,7 +76,7 @@ class ApiQueryInfo extends ApiQueryBase {
         * Get an array mapping token names to their handler functions.
         * The prototype for a token function is func($pageid, $title)
         * it should return a token or false (permission denied)
-        * @return array(tokenname => function)
+        * @return array array(tokenname => function)
         */
        protected function getTokenFunctions() {
                // Don't call the hooks twice
index 24b3277..842fb0d 100644 (file)
@@ -276,6 +276,7 @@ class ApiQueryContributions extends ApiQueryBase {
        /**
         * Extract fields from the database row and append them to a result array
         *
+        * @param $row
         * @return array
         */
        private function extractRowInfo( $row ) {