Minor - cleaning code

skala
Julio Montoya 13 years ago
parent 8209759518
commit cf939729c4
  1. 22
      main/inc/ajax/model.ajax.php
  2. 2
      main/inc/lib/main_api.lib.php
  3. 2
      main/inc/lib/message.lib.php

@ -155,6 +155,17 @@ switch ($action) {
case 'get_sessions':
$count = SessionManager::get_count_admin();
break;
/*case 'get_extra_fields':
$type = $_REQUEST['type'];
$obj = new ExtraField($type);
$count = $obj->get_count();
break;
case 'get_extra_field_options':
$type = $_REQUEST['type'];
$field_id = $_REQUEST['field_id'];
$obj = new ExtraFieldOption($type);
$count = $obj->get_count_by_field_id($field_id);
break;*/
case 'get_timelines':
require_once $libpath.'timeline.lib.php';
$obj = new Timeline();
@ -297,17 +308,6 @@ switch ($action) {
$columns = array('name', 'nbr_courses', 'nbr_users', 'category_name', 'date_start','date_end', 'coach_name', 'session_active', 'visibility');
$result = SessionManager::get_sessions_admin(array('where'=> $where_condition, 'order'=>"$sidx $sord", 'limit'=> "$start , $limit"));
break;
case 'get_extra_fields':
$type = $_REQUEST['type'];
$obj = new ExtraField($type);
$count = $obj->get_count();
break;
case 'get_extra_field_options':
$type = $_REQUEST['type'];
$field_id = $_REQUEST['field_id'];
$obj = new ExtraFieldOption($type);
$count = $obj->get_count_by_field_id($field_id);
break;
case 'get_timelines':
$columns = array('headline', 'actions');
//$columns = array('headline', 'type', 'start_date', 'end_date', 'text', 'media', 'media_credit', 'media_caption', 'title_slide', 'parent_id');

@ -273,7 +273,7 @@ define('USER_RELATION_TYPE_DELETED', 6);
define('USER_RELATION_TYPE_RRHH', 7);
//Gradebook link constants
// Please do not change existing values, they are used in the database !
//Please do not change existing values, they are used in the database !
define('LINK_EXERCISE', 1);
define('LINK_DROPBOX', 2);

@ -301,7 +301,7 @@ class MessageManager
foreach($user_list as $user_data) {
$new_user_list[] = $user_data['user_id'];
}
$group_info = array('group_info'=>$group_info, 'user_info' => $sender_info);
$group_info = array('group_info' => $group_info, 'user_info' => $sender_info);
$notification->save_notification(NOTIFICATION_TYPE_GROUP, $new_user_list, $subject, $content, $group_info);
}
return $inbox_last_id;

Loading…
Cancel
Save