Minor - fixing PHP notice.

1.9.x
Julio Montoya 11 years ago
parent 82b95d4c24
commit 4549f630f6
  1. 2
      main/announcements/announcements.php
  2. 5
      main/user/subscribe_user.php
  3. 5
      main/work/work_list.php

@ -109,7 +109,7 @@ if (!empty($_POST['To']) and ($select_groupusers_status=="show")) {
$_SESSION['select_groupusers'] = "hide";
}
$origin = empty($_GET['origin']) ? '' : Security::remove_XSS($_GET['origin']);
$origin = isset($_GET['origin']) ? Security::remove_XSS($_GET['origin']) : null;
/* Action handling */

@ -31,14 +31,13 @@ if (!api_is_allowed_to_edit()) {
}
$tool_name = get_lang("SubscribeUserToCourse");
if ($_REQUEST['type']=='teacher') {
if (isset($_REQUEST['type']) && $_REQUEST['type']=='teacher') {
$tool_name = get_lang("SubscribeUserToCourseAsTeacher");
}
//extra entries in breadcrumb
$interbreadcrumb[] = array ("url" => "user.php", "name" => get_lang("ToolUser"));
if ($_GET['keyword']) {
if (isset($_REQUEST['keyword']) && $_GET['keyword']) {
$interbreadcrumb[] = array ("url" => "subscribe_user.php?type=".Security::remove_XSS($_GET['type']), "name" => $tool_name);
$tool_name = get_lang('SearchResults');
}

@ -15,6 +15,7 @@ require_once 'work.lib.php';
$this_section = SECTION_COURSES;
$workId = isset($_GET['id']) ? intval($_GET['id']) : null;
$origin = isset($origin) ? Security::remove_XSS($origin) : null;
if (empty($workId)) {
api_not_allowed(true);
@ -62,9 +63,9 @@ $documentsAddedInWork = getAllDocumentsFromWorkToString($workId, $courseInfo);
Display :: display_header(null);
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'&origin='.$origin.'&gradebook='.$gradebook.'">'.Display::return_icon('back.png', get_lang('BackToWorksList'),'',ICON_SIZE_MEDIUM).'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'&origin='.$origin.'">'.Display::return_icon('back.png', get_lang('BackToWorksList'),'',ICON_SIZE_MEDIUM).'</a>';
if (api_is_allowed_to_session_edit(false, true) && !empty($workId)) {
echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/upload.php?'.api_get_cidreq().'&id='.$workId.'&origin='.$origin.'&gradebook='.$gradebook.'">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/upload.php?'.api_get_cidreq().'&id='.$workId.'&origin='.$origin.'">';
echo Display::return_icon('upload_file.png', get_lang('UploadADocument'), '', ICON_SIZE_MEDIUM).'</a>';
}
echo '</div>';

Loading…
Cancel
Save