Fixing PHP warnings

skala
Julio Montoya 12 years ago
parent a748ff13fa
commit 98d543d6be
  1. 10
      main/admin/add_courses_to_session.php
  2. 5
      main/admin/add_users_to_session.php

@ -88,7 +88,7 @@ $CourseList=$SessionList=array();
$courses=$sessions=array();
$noPHP_SELF=true;
if ($_POST['formSent']) {
if (isset($_POST['formSent']) && $_POST['formSent']) {
$formSent = $_POST['formSent'];
$firstLetterCourse = $_POST['firstLetterCourse'];
@ -199,8 +199,7 @@ if ($ajax_search) {
AND session_rel_course.id_session = ".intval($id_session)."
ORDER BY ".(sizeof($courses)?"(code IN(".implode(',',$courses).")) DESC,":"")." title";
global $_configuration;
if ($_configuration['multiple_access_urls']) {
if (api_is_multiple_url_enabled()) {
$tbl_course_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1){
@ -230,8 +229,7 @@ if ($ajax_search) {
AND session_rel_course.id_session = ".intval($id_session)."
ORDER BY ".(sizeof($courses)?"(code IN(".implode(',',$courses).")) DESC,":"")." title";
global $_configuration;
if ($_configuration['multiple_access_urls']) {
if (api_is_multiple_url_enabled()) {
$tbl_course_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1){
@ -258,7 +256,7 @@ if ($ajax_search) {
}
unset($Courses);
?>
<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo Security::remove_XSS($_GET['page']) ?>&id_session=<?php echo $id_session; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>>
<legend><?php echo $tool_name.' ('.$session_info['name'].')'; ?></legend>
<input type="hidden" name="formSent" value="1" />

@ -119,8 +119,7 @@ function search_users($needle, $type) {
break;
}
global $_configuration;
if ($_configuration['multiple_access_urls']) {
if (api_is_multiple_url_enabled()) {
$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1) {
@ -238,7 +237,7 @@ $UserList=$SessionList=array();
$sessions = array();
$noPHP_SELF = true;
if ($_POST['form_sent']) {
if (isset($_POST['form_sent']) && $_POST['form_sent']) {
$form_sent = $_POST['form_sent'];
$firstLetterUser = $_POST['firstLetterUser'];
$firstLetterSession = $_POST['firstLetterSession'];

Loading…
Cancel
Save