Fix from pull request observations - refs BT#9092

1.10.x
Daniel Barreto 10 years ago
parent 1bdc1dd719
commit 6d2c9e5ce1
  1. 16
      main/inc/lib/sessionmanager.lib.php
  2. 2
      main/inc/lib/usermanager.lib.php
  3. 4
      main/webservices/registration.soap.php
  4. 2
      plugin/advancedsubscription/src/HookAdvancedSubscription.php

@ -5429,13 +5429,15 @@ class SessionManager
}
/**
* Returns the list of session (name, short description, start date, end date) from category.
* The short description is an extra field value
* Returns list of a few data from session (name, short description, start date, end date)
* And the next extra fields
* short_description, mode, duration, vacancies, brochure, target, schedule
* from Session category Id.
* @param int $categoryId
* @param string $target
* @return mixed
*/
public static function getSessionBriefListByCategory($categoryId, $target) {
public static function getBriefSessionListAndExtraByCategory($categoryId, $target) {
// Init variables
$categoryId = (int) $categoryId;
$sessionList = array();
@ -5653,13 +5655,13 @@ class SessionManager
// Not found result, update error message
$errorResult['errorMessage'] = 'Not found any session for session category id ' . $sessionCategoryId;
}
return $errorResult;
}
return $errorResult;
}
/**
* Return session description from
* Return session description from session id
* @param int $sessionId
* @return string
*/
@ -5669,7 +5671,7 @@ class SessionManager
$sessionId = intval($sessionId);
$description = '';
// Check if session id is valid
if ($sessionId !== 0) {
if ($sessionId > 0) {
// Select query from session id
$rows = Database::select(
'description',

@ -5116,7 +5116,7 @@ EOF;
public static function getStudentBoss($userId)
{
$userId = intval($userId);
if ($userId !== 0) {
if ($userId > 0) {
$userRelTable = Database::get_main_table(TABLE_MAIN_USER_REL_USER);
$row = Database::select(
'DISTINCT friend_user_id AS boss_id',

@ -22,13 +22,13 @@ function return_error($code) {
$fault = new soap_fault('Server', '', 'Secret key is not correct or params are not correctly set');
break;
case WS_ERROR_NOT_FOUND_RESULT:
$fault = new soap_fault('Server', '', 'Not found any result from the query');
$fault = new soap_fault('Server', '', 'No result was found for this query');
break;
case WS_ERROR_INVALID_INPUT:
$fault = new soap_fault('Server', '', 'The input variables are invalid o are not correctly set');
break;
case WS_ERROR_SETTING:
$fault = new soap_fault('Server', '', 'Please check the configuration and installation for this webservice');
$fault = new soap_fault('Server', '', 'Please check the configuration for this webservice');
break;
}
return $fault;

@ -397,7 +397,7 @@ class HookAdvancedSubscription extends HookObserver implements
}
// Get the session brief List by category
$sessionList = SessionManager::getSessionBriefListByCategory($sessionCategoryId, $params['target']);
$sessionList = SessionManager::getBriefSessionListAndExtraByCategory($sessionCategoryId, $params['target']);
return $sessionList;
}

Loading…
Cancel
Save