Fixing array_map function uses

skala
Julio Montoya 13 years ago
parent f27fa81287
commit acf15e8c8e
  1. 2
      main/coursecopy/classes/CourseBuilder.class.php
  2. 2
      main/dropbox/dropbox_functions.inc.php
  3. 2
      main/exercice/exercise.class.php

@ -710,7 +710,7 @@ class CourseBuilder {
} }
if (!empty($id_list)) { if (!empty($id_list)) {
array_map('intval', $id_list); $id_list = array_map('intval', $id_list);
$sql .=" AND id IN (".implode(', ', $id_list).") "; $sql .=" AND id IN (".implode(', ', $id_list).") ";
} }

@ -1057,7 +1057,7 @@ function zip_download($array) {
// place to temporarily stash the zipfiles // place to temporarily stash the zipfiles
$temp_zip_dir = api_get_path(SYS_COURSE_PATH); $temp_zip_dir = api_get_path(SYS_COURSE_PATH);
array_map('intval', $array); $array = array_map('intval', $array);
// note: we also have to add the check if the user has received or sent this file. // note: we also have to add the check if the user has received or sent this file.
$sql = "SELECT DISTINCT file.filename, file.title, file.author, file.description $sql = "SELECT DISTINCT file.filename, file.title, file.author, file.description

@ -1569,7 +1569,7 @@ class Exercise {
$sql_fields = ""; $sql_fields = "";
$sql_fields_values = ""; $sql_fields_values = "";
} }
array_map('intval', $questionList); $questionList = array_map('intval', $questionList);
$weight = Database::escape_string($weight); $weight = Database::escape_string($weight);
$sql = "INSERT INTO $track_exercises ($sql_fields exe_exo_id, exe_user_id, exe_cours_id, status,session_id, data_tracking, start_date, orig_lp_id, orig_lp_item_id, exe_weighting) $sql = "INSERT INTO $track_exercises ($sql_fields exe_exo_id, exe_user_id, exe_cours_id, status,session_id, data_tracking, start_date, orig_lp_id, orig_lp_item_id, exe_weighting)

Loading…
Cancel
Save