r111948 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111947‎ | r111948 | r111949 >
Date:18:28, 20 February 2012
Author:jeroendedauw
Status:ok
Tags:
Comment:
added missing param parsing step
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/api/ApiAskArgs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/api/ApiAskArgs.php
@@ -18,8 +18,15 @@
1919 public function execute() {
2020 $params = $this->extractRequestParams();
2121 $this->requireParameters( $params, array( 'conditions' ) );
22 - $this->parameters = $params['parameters'];
2322
 23+ foreach ( $params['parameters'] as $param ) {
 24+ $parts = explode( '=', $param, 2 );
 25+
 26+ if ( count( $parts ) == 2 ) {
 27+ $this->parameters[$parts[0]] = $parts[1];
 28+ }
 29+ }
 30+
2431 $query = $this->getQuery(
2532 implode( array_map( array( __CLASS__, 'wrapCondition' ), $params['conditions'] ) ),
2633 array_map( array( __CLASS__, 'printoutFromString' ), $params['printouts'] )

Status & tagging log