Skip to content

Commit

Permalink
#10008:
Browse files Browse the repository at this point in the history
Array/struct parameter in remove control function - list_participants

The struct parameter is changed in array in XMLRPC function parameters.
  • Loading branch information
kochichi committed Oct 31, 2015
1 parent 3405470 commit 7bc5e95
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
11 changes: 9 additions & 2 deletions application/controllers/admin/remotecontrol.php
Expand Up @@ -45,9 +45,16 @@ public function run()
Yii::import('application.libraries.LSZend_XmlRpc_Response_Http');
$this->xmlrpc->setResponseClass('LSZend_XmlRpc_Response_Http');
$this->xmlrpc->setClass($oHandler);
/* @var LSZend_XmlRpc_Response_Http */
$result = $this->xmlrpc->handle();
$result->printXml();
if ($result instanceof LSZend_XmlRpc_Response_Http)
{
$result->printXml();
}
else
{
// an Zend_XmlRpc_Server_Fault with exception message from XMLRPC
echo $result;
}
}
elseif($RPCType=='json')
{
Expand Down
8 changes: 8 additions & 0 deletions application/helpers/Zend/XmlRpc/Server.php
Expand Up @@ -583,6 +583,14 @@ protected function _handle(Zend_XmlRpc_Request $request)
}
}

foreach ($sigCalled as $key => $param) {
// the struct of XMLRPC is an array in PHP
if ($param == 'struct')
{
$sigCalled[$key] = 'array';
}
}

$signatures = $info->getPrototypes();
foreach ($signatures as $signature) {
$sigParams = $signature->getParameters();
Expand Down
1 change: 1 addition & 0 deletions application/helpers/remotecontrol/remotecontrol_handle.php
Expand Up @@ -1802,6 +1802,7 @@ public function list_participants($sSessionKey, $iSurveyID, $iStart=0, $iLimit=1
if(count($oTokens)==0)
return array('status' => 'No Tokens found');

$extendedAttributes = array();
if($aAttributes) {
$aBasicDestinationFields=Token::model($iSurveyID)->tableSchema->columnNames;
$aTokenProperties=array_intersect($aAttributes,$aBasicDestinationFields);
Expand Down

0 comments on commit 7bc5e95

Please sign in to comment.