Minor - adding intval function

skala
Julio Montoya 15 years ago
parent 0d9ec8e69e
commit 090bd9c1c5
  1. 4
      main/work/work.lib.php

@ -227,7 +227,7 @@ function display_user_link_work($user_id, $name='')
if ($user_id <> 0) {
$table_user = Database::get_main_table(TABLE_MAIN_USER);
$sql = "SELECT user_id, firstname, lastname FROM $table_user WHERE user_id='".Database::escape_string($user_id)."'";
$sql = "SELECT user_id, firstname, lastname FROM $table_user WHERE user_id='".Database::escape_string($user_id)."'";
$result = Database::query($sql);
$row = Database::fetch_array($result);
if ($name=='') {
@ -359,7 +359,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
} else {
if (!empty($_SESSION['toolgroup'])) {
$group_query = " WHERE post_group_id = '".$_SESSION['toolgroup']."' "; // set to select only messages posted by the user's group
$group_query = " WHERE post_group_id = '".intval($_SESSION['toolgroup'])."' "; // set to select only messages posted by the user's group
$subdirs_query = "AND url NOT LIKE BINARY '$sub_course_dir%/%' AND url LIKE BINARY '$sub_course_dir%'";
} else {
$group_query = " WHERE post_group_id = '0' ";

Loading…
Cancel
Save