Remove header class

1.10.x
Julio Montoya 10 years ago
parent 8f99998def
commit 471cd47e93
  1. 3
      main/admin/index.php
  2. 3
      main/admin/skill_create.php
  3. 3
      main/admin/skill_edit.php
  4. 3
      main/gradebook/certificate_report.php
  5. 10
      main/gradebook/search.php
  6. 6
      main/inc/lib/javascript/chat/video.php
  7. 23
      main/inc/lib/system/web/header.class.php
  8. 11
      plugin/advanced_subscription/ajax/advanced_subscription.ajax.php
  9. 2
      plugin/advanced_subscription/src/terms_and_conditions.php

@ -498,7 +498,8 @@ if (api_is_platform_admin()) {
file_put_contents($fullFilePath, $extraData['extra_content']);
Header::location(api_get_self());
header('Location: '.api_get_self());
exit;
}
}

@ -90,7 +90,8 @@ if ($createForm->validate()) {
);
}
Header::location(api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php');
header('Location: '.api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php');
exit;
}
/* view */

@ -94,7 +94,8 @@ if ($editForm->validate()) {
);
}
Header::location(api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php');
header('Location: '.api_get_path(WEB_CODE_PATH) . 'admin/skill_list.php');
exit;
}
/* view */

@ -187,7 +187,8 @@ if ($searchSessionAndCourse || $searchCourseOnly) {
if (empty($selectedStudentInfo)) {
Session::write('reportErrorMessage', get_lang('NoUser'));
Header::location($selfUrl);
header('Location: '.$selfUrl);
exit;
}
$sessionList = SessionManager::getSessionsFollowedByUser($selectedStudent);

@ -37,15 +37,16 @@ if ($searchForm->validate()) {
if (empty($userList)) {
Session::write('message', Display::return_message(get_lang('NoResults'), 'warning'));
Header::location(api_get_self());
header('Location: '.api_get_self());
exit;
}
} elseif ($userId > 0) {
$userInfo = api_get_user_info($userId);
if (empty($userInfo)) {
Session::write('message', Display::return_message(get_lang('NoUser'), 'warning'));
Header::location(api_get_self());
header('Location: '.api_get_self());
exit;
}
$courseList = GradebookUtils::getUserCertificatesInCourses($userId, false);
@ -60,7 +61,8 @@ if ($searchForm->validate()) {
)
);
Header::location(api_get_self());
header('Location: '.api_get_self());
exit;
}
}

@ -11,7 +11,8 @@ $roomName = isset($_GET['room']) ? $_GET['room'] : null;
$room = VideoChat::getChatRoomByName($roomName);
if ($room === false) {
Header::location(api_get_path(WEB_PATH));
header('Location: '.api_get_path(WEB_PATH));
exit;
}
$friend_html = SocialManager::listMyFriendsBlock($user_id, '', false);
@ -20,7 +21,8 @@ $isSender = $room['from_user'] == api_get_user_id();
$isReceiver = $room['to_user'] == api_get_user_id();
if (!$isSender && !$isReceiver) {
Header::location(api_get_path(WEB_PATH));
header('Location: '.api_get_path(WEB_PATH));
exit;
}
if ($isSender) {

@ -1,23 +0,0 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Header utility functions.
*
* @license see /license.txt
* @author Laurent Opprecht <laurent@opprecht.info> for the Univesity of Geneva
* @deprecated
*/
class Header
{
/**
* Redirect the navigator to the specified url.
*
* @param string $url
*/
public static function location($url)
{
header("Location: $url");
exit;
}
}

@ -156,7 +156,7 @@ if ($verified) {
if (isset($result['mailIds']['render'])) {
// Render mail
$url = $plugin->getRenderMailUrl(array('queueId' => $result['mailIds']['render']));
Header::location($url);
header('Location: '.$url);
exit;
}
}
@ -180,7 +180,7 @@ if ($verified) {
if (isset($result['mailIds']['render'])) {
// Render mail
$url = $plugin->getRenderMailUrl(array('queueId' => $result['mailIds']['render']));
Header::location($url);
header('Location: '.$url);
exit;
}
}
@ -190,7 +190,7 @@ if ($verified) {
if ($lastMessageId !== false) {
// Render mail
$url = $plugin->getRenderMailUrl(array('queueId' => $lastMessageId));
Header::location($url);
header('Location: '.$url);
exit;
} else {
if (is_string($res)) {
@ -200,7 +200,8 @@ if ($verified) {
}
$result['pass'] = false;
$url = $plugin->getTermsUrl($data, ADVANCED_SUBSCRIPTION_TERMS_MODE_FINAL);
Header::location($url);
header('Location: '.$url);
exit;
}
}
@ -329,7 +330,7 @@ if ($verified) {
if (isset($result['mailIds']['render'])) {
// Render mail
$url = $plugin->getRenderMailUrl(array('queueId' => $result['mailIds']['render']));
Header::location($url);
header('Location: '.$url);
exit;
}
}

@ -39,7 +39,7 @@ if (
if ($lastMessageId !== false) {
// Render mail
$url = $plugin->getRenderMailUrl(array('queueId' => $lastMessageId));
Header::location($url);
header('Location: '.$url);
exit;
}
$courses = SessionManager::get_course_list_by_session_id($data['sessionId']);

Loading…
Cancel
Save