}
public function getAllowedParams() {
- global $wgUrlProtocols;
- $protocols = array( '' );
- foreach ( $wgUrlProtocols as $p ) {
- $protocols[] = substr( $p, 0, strpos( $p, ':' ) );
- }
-
return array(
'prop' => array(
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => 'integer'
),
'protocol' => array(
- ApiBase::PARAM_TYPE => $protocols,
+ ApiBase::PARAM_TYPE => self::prepareProtocols(),
ApiBase::PARAM_DFLT => '',
),
'query' => null,
);
}
+ public static function prepareProtocols() {
+ global $wgUrlProtocols;
+ $protocols = array( '' );
+ foreach ( $wgUrlProtocols as $p ) {
+ $protocols[] = substr( $p, 0, strpos( $p, ':' ) );
+ }
+ return $protocols;
+ }
+
public function getParamDescription() {
$p = $this->getModulePrefix();
return array(