From 0f56b21681eb4e142c81931872225cd5218e1dbb Mon Sep 17 00:00:00 2001 From: Francis Gonzales Date: Wed, 16 Apr 2014 11:01:51 -0500 Subject: [PATCH] Rename the column name category_name - refs BT#7972 --- main/inc/ajax/model.ajax.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main/inc/ajax/model.ajax.php b/main/inc/ajax/model.ajax.php index 4346583bed..03c31e559c 100644 --- a/main/inc/ajax/model.ajax.php +++ b/main/inc/ajax/model.ajax.php @@ -257,6 +257,7 @@ switch ($action) { break; case 'get_sessions': $courseId = isset($_GET['course_id']) && !empty($_GET['course_id']) ? intval($_GET['course_id']) : null; + $where_condition = str_replace('category_name', 'sc.name', $where_condition); if (!empty($courseId)) { $where_condition .= " c.id = $courseId"; } @@ -617,7 +618,10 @@ switch ($action) { $columns = array( 'name', 'nbr_courses', 'nbr_users', 'category_name', 'date_start','date_end', 'coach_name', 'session_active', 'visibility' ); - + + //Rename Category_name + $where_condition = str_replace('category_name', 'sc.name', $where_condition); + $result = SessionManager::get_sessions_admin( array( 'where' => $where_condition,