X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryORM.php;h=035f9017cec715a23e6f617f2c1b7f95c4a7a7b6;hb=6d9946294737f21d939c1addf81496ed679beb24;hp=f0c2b1b37ec1da81babbb057597987d77d903b3b;hpb=7cf16f046ca5066140bf3bf196aca72797e1d5d6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryORM.php b/includes/api/ApiQueryORM.php index f0c2b1b37e..035f9017ce 100644 --- a/includes/api/ApiQueryORM.php +++ b/includes/api/ApiQueryORM.php @@ -35,7 +35,7 @@ abstract class ApiQueryORM extends ApiQueryBase { * * @return IORMTable */ - protected abstract function getTable(); + abstract protected function getTable(); /** * Returns the name of the individual rows. @@ -104,7 +104,7 @@ abstract class ApiQueryORM extends ApiQueryBase { protected function getParams() { return array_filter( $this->extractRequestParams(), - function( $prop ) { + function ( $prop ) { return isset( $prop ); } ); @@ -228,20 +228,24 @@ abstract class ApiQueryORM extends ApiQueryBase { * @return array */ public function getAllowedParams() { - $params = array ( + $params = array( 'props' => array( ApiBase::PARAM_TYPE => $this->getTable()->getFieldNames(), ApiBase::PARAM_ISMULTI => true, ApiBase::PARAM_REQUIRED => true, + ApiBase::PARAM_HELP_MSG => 'api-orm-param-props', ), 'limit' => array( ApiBase::PARAM_DFLT => 20, ApiBase::PARAM_TYPE => 'limit', ApiBase::PARAM_MIN => 1, ApiBase::PARAM_MAX => ApiBase::LIMIT_BIG1, - ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2 + ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2, + ApiBase::PARAM_HELP_MSG => 'api-orm-param-limit', + ), + 'continue' => array( + ApiBase::PARAM_HELP_MSG => 'api-help-param-continue', ), - 'continue' => null, ); return array_merge( $this->getTable()->getAPIParams(), $params ); @@ -249,10 +253,11 @@ abstract class ApiQueryORM extends ApiQueryBase { /** * @see ApiBase::getParamDescription() + * @deprecated since 1.25 * @return array */ public function getParamDescription() { - $descriptions = array ( + $descriptions = array( 'props' => 'Fields to query', 'continue' => 'Offset number from where to continue the query', 'limit' => 'Max amount of rows to return', @@ -260,5 +265,4 @@ abstract class ApiQueryORM extends ApiQueryBase { return array_merge( $this->getTable()->getFieldDescriptions(), $descriptions ); } - }