diff --git a/main/dropbox/dropbox_submit.php b/main/dropbox/dropbox_submit.php index 8bcc8ef463..511ba88e41 100755 --- a/main/dropbox/dropbox_submit.php +++ b/main/dropbox/dropbox_submit.php @@ -246,7 +246,7 @@ if (isset($_GET['mailingIndex'])) { // examine or send $var = api_strtoupper($nameParts[2]); // the variable part of the name $course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER); $sel = "SELECT u.user_id, u.lastname, u.firstname, cu.status - FROM `".$_configuration['main_database']."`.`user` u + FROM ".$_configuration['main_database'].".user u LEFT JOIN $course_user cu ON cu.user_id = u.user_id AND cu.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND cu.course_code = '".$_course['sysCode']."'"; $sel .= " WHERE u.".dropbox_cnf("mailingWhere".$var)." = '"; @@ -361,7 +361,7 @@ if (isset($_GET['mailingIndex'])) { // examine or send $course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER); $sql = "SELECT u.lastname, u.firstname FROM $course_user cu - LEFT JOIN `".$_configuration['main_database']."`.`user` u + LEFT JOIN ".$_configuration['main_database'].".user u ON cu.user_id = u.user_id AND cu.course_code = '".$_course['sysCode']."' WHERE cu.status = 5 AND u.user_id NOT IN ('" . implode("', '" , $students) . "')";