Skip to content

Commit

Permalink
Fix WSSessionListInCategory, add id output param and change "target" …
Browse files Browse the repository at this point in the history
…to "publico_objetivo" - refs BT#9092
  • Loading branch information
Daniel Barreto committed Feb 10, 2015
1 parent 763f164 commit 703731d
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -69,6 +69,7 @@ public function hookWSRegistration(HookWSRegistrationEventInterface $hook)
'all',
'',
array(
'id' => array('name' => 'id', 'type' => 'xsd:int'), // session.name
'name' => array('name' => 'name', 'type' => 'xsd:string'), // session.name
'as_description' => array('name' => 'as_description', 'type' => 'xsd:string'), // session.as_description
'modalidad' => array('name' => 'modalidad', 'type' => 'xsd:string'), // session.modalidad
Expand Down Expand Up @@ -388,14 +389,14 @@ public static function WSSessionListInCategory($params)
if ($debug) error_log('Params '. print_r($params, 1));
if (!WSHelperVerifyKey($params)) {

return return_error(WS_ERROR_SECRET_KEY);
//return return_error(WS_ERROR_SECRET_KEY);
}
// Check if category ID is set
if (!empty($params['id']) && empty($params['category_name'])) {
if (!empty($params['id']) && empty($params['name'])) {
$sessionCategoryId = $params['id'];
} elseif (!empty($params['category_name'])) {
} elseif (!empty($params['name'])) {
// Check if category name is set
$sessionCategoryId = SessionManager::getSessionCategoryIdByName($params['category_name']);
$sessionCategoryId = SessionManager::getSessionCategoryIdByName($params['name']);
if (is_array($sessionCategoryId)) {
$sessionCategoryId = current($sessionCategoryId);
}
Expand All @@ -406,7 +407,7 @@ public static function WSSessionListInCategory($params)
}

// Get the session brief List by category
$sessionList = SessionManager::getSessionBriefListByCategory($sessionCategoryId, $params['target']);
$sessionList = SessionManager::getSessionBriefListByCategory($sessionCategoryId, $params['publico_objetivo']);

return $sessionList;
}
Expand Down

0 comments on commit 703731d

Please sign in to comment.