Add secret key param to WSSearchSession - refs BT#9418

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent a743554ecc
commit ab68ea06c4
  1. 10
      main/webservices/registration.soap.php

@ -5557,7 +5557,8 @@ $server->wsdl->addComplexType(
'',
array(
'term' => array('name' => 'term', 'type' => 'xsd:string'),
'extrafields' => array('name' => 'extrafields', 'type' => 'xsd:string')
'extrafields' => array('name' => 'extrafields', 'type' => 'xsd:string'),
'secret_key' => array('name' => 'secret_key', 'type' => 'xsd:string')
)
);
@ -5634,10 +5635,15 @@ $server->register(
* Web service to get a session list filtered by name, description or short description extra field
* @param string Secret key
* @param string $extraFields Extrafields to include in request result
* @param string $secretKey Secret key to check
* @return array The list
*/
function WSSearchSession($term, $extraFields)
function WSSearchSession($term, $extraFields, $secretKey)
{
if (!WSHelperVerifyKey($secretKey)) {
return return_error(WS_ERROR_SECRET_KEY);
}
$fieldsToInclude = explode(',', $extraFields);
foreach ($fieldsToInclude as &$field) {

Loading…
Cancel
Save