https://bugzilla.wikimedia.org/show_bug.cgi?id=17784
--- Comment #5 from Roan Kattouw <[email protected]> 2009-03-10 18:51:14 UTC --- (In reply to comment #1) > >+ "_sort" => array( > >+ ApiBase :: PARAM_TYPE => "string", > >+ ), > You can use ApiBase::PARAM_ISMULTI => true here to allow for multiple values > separated with pipes (|), which is how multivalue fields are usually done in > the API. The API parameter handling code will ensure that $params['_sort'] is > an array rather than a pipe- (or comma-)separated list in that case. Also note > that 'string' is the default parameter type, you don't have to set it > explicitly. > While you did follow this piece of advice... > >+ "_sort_order" => array( > >+ ApiBase :: PARAM_TYPE => "string" > >+ ), > If the only values allowed are ASC and DESC, you'd probably be better off > with: > '_sort_order' => array( > ApiBase :: PARAM_TYPE => array( > 'asc', > 'desc' > ), > ApiBase :: PARAM_ISMULTI => true, > ApiBase :: PARAM_ALLOW_DUPLICATES => true > ), > Which'll do the same thing as I mentioned above, except that only the values > 'asc' and 'desc' are accepted and that duplicate values are allowed. > You didn't follow this one. Did you overlook it or do you have a reason to do this? -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
