Update documentation

Fix some context method calls which were considered deprecated
This commit is contained in:
Sam Reed 2011-10-28 18:10:41 +00:00
parent 6e98495b5d
commit 1ba364df99
6 changed files with 16 additions and 4 deletions

View 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 ) );

View 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();
}

View 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 ) {

View 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 );
}

View 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

View 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 ) {