From f360481b4e572fd0782a1b6c53a80ca50729b23c Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 8 Aug 2012 11:14:38 +0200 Subject: [PATCH] fixing SQL error --- main/link/link.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/link/link.php b/main/link/link.php index 12dcfee3ed..621601e98d 100644 --- a/main/link/link.php +++ b/main/link/link.php @@ -324,7 +324,7 @@ if (api_is_allowed_to_edit(null, true) && isset($_GET['action'])) { foreach ($specific_fields as $specific_field) { $default_values = ''; if ($_GET['action'] == 'editlink') { - $filter = array('c_id'=> "'". api_get_course_int_id() ."'", 'field_id' => $specific_field['id'], 'ref_id' => Security::remove_XSS($_GET['id']), 'tool_id' => '\''. TOOL_LINK .'\''); + $filter = array('field_id' => $specific_field['id'], 'ref_id' => intval($_GET['id']), 'tool_id' => '\''. TOOL_LINK .'\''); $values = get_specific_field_values_list($filter, array('value')); if (!empty($values)) { $arr_str_values = array();