Minor - format code.

1.9.x
Julio Montoya 11 years ago
parent 85a8c47cb5
commit 4f0b9676e2
  1. 5
      main/admin/dashboard_add_sessions_to_user.php
  2. 7
      main/inc/lib/sessionmanager.lib.php

@ -178,7 +178,6 @@ echo '</div>';
echo Display::page_header(sprintf(get_lang('AssignSessionsToX'), api_get_person_name($user_info['firstname'], $user_info['lastname']))); echo Display::page_header(sprintf(get_lang('AssignSessionsToX'), api_get_person_name($user_info['firstname'], $user_info['lastname'])));
$assigned_sessions_to_hrm = SessionManager::get_sessions_followed_by_drh($user_id); $assigned_sessions_to_hrm = SessionManager::get_sessions_followed_by_drh($user_id);
$assigned_sessions_id = array_keys($assigned_sessions_to_hrm); $assigned_sessions_id = array_keys($assigned_sessions_to_hrm);
$without_assigned_sessions = ''; $without_assigned_sessions = '';
@ -255,7 +254,9 @@ if(!empty($msg)) {
<?php <?php
while ($enreg = Database::fetch_array($result)) { while ($enreg = Database::fetch_array($result)) {
?> ?>
<option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"';?>><?php echo $enreg['name']; ?></option> <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"';?>>
<?php echo $enreg['name']; ?>
</option>
<?php } ?> <?php } ?>
</select></div> </select></div>
</td> </td>

@ -2391,6 +2391,7 @@ class SessionManager
* @param bool $getCount * @param bool $getCount
* @param bool $getOnlySessionId * @param bool $getOnlySessionId
* @param bool $getSql * @param bool $getSql
* @param string $orderCondition
* @return array sessions * @return array sessions
*/ */
public static function get_sessions_followed_by_drh( public static function get_sessions_followed_by_drh(
@ -2408,7 +2409,6 @@ class SessionManager
$tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); $tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION);
$userId = intval($userId); $userId = intval($userId);
$assigned_sessions_to_hrm = array();
$select = " SELECT * "; $select = " SELECT * ";
@ -2461,12 +2461,13 @@ class SessionManager
return $row['count']; return $row['count'];
} }
$sessions = array();
if (Database::num_rows($result) > 0) { if (Database::num_rows($result) > 0) {
while ($row = Database::fetch_array($result)) { while ($row = Database::fetch_array($result)) {
$assigned_sessions_to_hrm[$row['id']] = $row; $sessions[$row['id']] = $row;
} }
} }
return $assigned_sessions_to_hrm; return $sessions;
} }
/** /**

Loading…
Cancel
Save