Format code, remove unused variable $noPHP_SELF

pull/2487/head
jmontoyaa 7 years ago
parent e8f0c70d59
commit f519b6c8d4
  1. 2
      main/admin/ldap_users_synchro.php
  2. 1
      main/admin/user_edit.php
  3. 1
      main/course_info/delete_course.php
  4. 1
      main/document/create_document.php
  5. 1
      main/document/create_draw.php
  6. 1
      main/document/create_paint.php
  7. 1
      main/document/edit_draw.php
  8. 1
      main/document/edit_paint.php
  9. 1
      main/document/record_audio.php
  10. 1
      main/document/show_content.php
  11. 1
      main/document/showinframes.php
  12. 1
      main/document/slideshow.php
  13. 1
      main/document/webcam_clip.php
  14. 2
      main/exercise/admin.php
  15. 2
      main/exercise/showinframes.php
  16. 2
      main/session/add_users_to_session.php
  17. 1
      main/upload/form.document.php
  18. 5
      main/upload/index.php
  19. 1
      main/upload/upload.document.php
  20. 2
      main/user/add_users_to_session.php

@ -41,8 +41,6 @@ $formSent = 0;
$errorMsg = $firstLetterUser = $firstLetterSession = ''; $errorMsg = $firstLetterUser = $firstLetterSession = '';
$UserList = $SessionList = array(); $UserList = $SessionList = array();
$users = $sessions = array(); $users = $sessions = array();
$noPHP_SELF = true;
$page = intval($_GET['page']); $page = intval($_GET['page']);
$action = $_REQUEST['action']; $action = $_REQUEST['action'];

@ -76,7 +76,6 @@ if ($geolocalization) {
$htmlHeadXtra[] = api_get_css_asset('cropper/dist/cropper.min.css'); $htmlHeadXtra[] = api_get_css_asset('cropper/dist/cropper.min.css');
$htmlHeadXtra[] = api_get_asset('cropper/dist/cropper.min.js'); $htmlHeadXtra[] = api_get_asset('cropper/dist/cropper.min.js');
$noPHP_SELF = true;
$tool_name = get_lang('ModifyUserInfo'); $tool_name = get_lang('ModifyUserInfo');
$interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin')); $interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin'));

@ -35,7 +35,6 @@ if (isset($_GET['delete']) && $_GET['delete'] === 'yes') {
// DELETE CONFIRMATION MESSAGE // DELETE CONFIRMATION MESSAGE
Session::erase('_cid'); Session::erase('_cid');
Session::erase('_real_cid'); Session::erase('_real_cid');
$noPHP_SELF = true;
$message = '<h2>'.get_lang('Course').' : '.$current_course_name.' ('.$current_course_code.') </h2>'; $message = '<h2>'.get_lang('Course').' : '.$current_course_name.' ('.$current_course_code.') </h2>';
$message .= get_lang('HasDel'); $message .= get_lang('HasDel');
$message .= '<br /><br /><a href="../../index.php">'.get_lang('BackHome').'</a>'; $message .= '<br /><br /><a href="../../index.php">'.get_lang('BackHome').'</a>';

@ -203,7 +203,6 @@ if (!$is_certificate_mode) {
"url" => "../group/group_space.php?".api_get_cidreq(), "url" => "../group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace'), "name" => get_lang('GroupSpace'),
); );
$noPHP_SELF = true;
$path = explode('/', $dir); $path = explode('/', $dir);
if ('/'.$path[1] != $group_properties['directory']) { if ('/'.$path[1] != $group_properties['directory']) {
api_not_allowed(true); api_not_allowed(true);

@ -88,7 +88,6 @@ if (!empty($groupId)) {
"url" => "../group/group_space.php?".api_get_cidreq(), "url" => "../group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace') "name" => get_lang('GroupSpace')
); );
$noPHP_SELF = true;
$group = GroupManager :: get_group_properties($groupId); $group = GroupManager :: get_group_properties($groupId);
$path = explode('/', $dir); $path = explode('/', $dir);
if ('/'.$path[1] != $group['directory']) { if ('/'.$path[1] != $group['directory']) {

@ -80,7 +80,6 @@ if (!empty($groupId)) {
"url" => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(), "url" => api_get_path(WEB_CODE_PATH)."group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace'), "name" => get_lang('GroupSpace'),
); );
$noPHP_SELF = true;
$group = GroupManager::get_group_properties($groupId); $group = GroupManager::get_group_properties($groupId);
$path = explode('/', $dir); $path = explode('/', $dir);
if ('/'.$path[1] != $group['directory']) { if ('/'.$path[1] != $group['directory']) {

@ -91,7 +91,6 @@ if (!empty($group_id)) {
'name' => get_lang('GroupSpace'), 'name' => get_lang('GroupSpace'),
); );
$group_document = true; $group_document = true;
$noPHP_SELF = true;
} }
$is_certificate_mode = DocumentManager::is_certificate_mode($dir); $is_certificate_mode = DocumentManager::is_certificate_mode($dir);

@ -86,7 +86,6 @@ if (!empty($groupId)) {
'name' => get_lang('GroupSpace'), 'name' => get_lang('GroupSpace'),
); );
$group_document = true; $group_document = true;
$noPHP_SELF = true;
} }
$is_certificate_mode = DocumentManager::is_certificate_mode($dir); $is_certificate_mode = DocumentManager::is_certificate_mode($dir);

@ -77,7 +77,6 @@ if (!is_dir($filepath)) {
//groups //TODO: clean //groups //TODO: clean
if (!empty($groupId)) { if (!empty($groupId)) {
$interbreadcrumb[] = array("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace')); $interbreadcrumb[] = array("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
$noPHP_SELF = true;
$group = GroupManager :: get_group_properties($groupId); $group = GroupManager :: get_group_properties($groupId);
$path = explode('/', $dir); $path = explode('/', $dir);
if ('/'.$path[1] != $group['directory']) { if ('/'.$path[1] != $group['directory']) {

@ -10,7 +10,6 @@ require_once __DIR__.'/../inc/global.inc.php';
// Protection // Protection
api_protect_course_script(true); api_protect_course_script(true);
$noPHP_SELF = true;
$header_file = isset($_GET['file']) ? Security::remove_XSS($_GET['file']) : null; $header_file = isset($_GET['file']) ? Security::remove_XSS($_GET['file']) : null;
$document_id = intval($_GET['id']); $document_id = intval($_GET['id']);

@ -24,7 +24,6 @@ require_once __DIR__.'/../inc/global.inc.php';
api_protect_course_script(); api_protect_course_script();
$noPHP_SELF = true;
$header_file = isset($_GET['file']) ? Security::remove_XSS($_GET['file']) : null; $header_file = isset($_GET['file']) ? Security::remove_XSS($_GET['file']) : null;
$document_id = intval($_GET['id']); $document_id = intval($_GET['id']);
$originIsLearnpath = isset($_GET['origin']) && $_GET['origin'] === 'learnpathitem'; $originIsLearnpath = isset($_GET['origin']) && $_GET['origin'] === 'learnpathitem';

@ -12,7 +12,6 @@ use ChamiloSession as Session;
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
api_protect_course_script(); api_protect_course_script();
$noPHP_SELF = true;
$path = Security::remove_XSS($_GET['curdirpath']); $path = Security::remove_XSS($_GET['curdirpath']);
$pathurl = urlencode($path); $pathurl = urlencode($path);
$slide_id = isset($_GET['slide_id']) ? Security::remove_XSS($_GET['slide_id']) : null; $slide_id = isset($_GET['slide_id']) ? Security::remove_XSS($_GET['slide_id']) : null;

@ -82,7 +82,6 @@ if (!empty($groupId)) {
"url" => "../group/group_space.php?".api_get_cidreq(), "url" => "../group/group_space.php?".api_get_cidreq(),
"name" => get_lang('GroupSpace') "name" => get_lang('GroupSpace')
); );
$noPHP_SELF = true;
$group = GroupManager :: get_group_properties($groupId); $group = GroupManager :: get_group_properties($groupId);
$path = explode('/', $dir); $path = explode('/', $dir);
if ('/'.$path[1] != $group['directory']) { if ('/'.$path[1] != $group['directory']) {

@ -310,8 +310,6 @@ if (!$exerciseId && $nameTools != get_lang('ExerciseManagement')) {
if ($modifyIn == 'thisExercise') { if ($modifyIn == 'thisExercise') {
if ($buttonBack) { if ($buttonBack) {
$modifyIn = 'allExercises'; $modifyIn = 'allExercises';
} else {
$noPHP_SELF = true;
} }
} }
$htmlHeadXtra[] = '<script> $htmlHeadXtra[] = '<script>

@ -73,8 +73,6 @@ if ($title == '') {
$title = basename($my_file); $title = basename($my_file);
} }
$nameTools = $title; $nameTools = $title;
$noPHP_SELF = true;
$htmlHeadXtra[] = /** @lang HTML */<<<HTML $htmlHeadXtra[] = /** @lang HTML */<<<HTML
<script> <script>
$(document).on('ready', function () { $(document).on('ready', function () {

@ -317,8 +317,6 @@ $form_sent = 0;
$errorMsg = $firstLetterUser = $firstLetterSession = ''; $errorMsg = $firstLetterUser = $firstLetterSession = '';
$UserList = $SessionList = array(); $UserList = $SessionList = array();
$sessions = array(); $sessions = array();
$noPHP_SELF = true;
if (isset($_POST['form_sent']) && $_POST['form_sent']) { if (isset($_POST['form_sent']) && $_POST['form_sent']) {
$form_sent = $_POST['form_sent']; $form_sent = $_POST['form_sent'];
$firstLetterUser = isset($_POST['firstLetterUser']) ? $_POST['firstLetterUser'] : ''; $firstLetterUser = isset($_POST['firstLetterUser']) ? $_POST['firstLetterUser'] : '';

@ -10,7 +10,6 @@
/** /**
* Just display the form needed to upload a SCORM and give its settings * Just display the form needed to upload a SCORM and give its settings
*/ */
$noPHP_SELF = false;
$nameTools = get_lang('FileUpload'); $nameTools = get_lang('FileUpload');
$interbreadcrumb[] = array("url"=>"../lp/lp_controller.php?action=list", "name"=> get_lang(TOOL_DOCUMENT)); $interbreadcrumb[] = array("url"=>"../lp/lp_controller.php?action=list", "name"=> get_lang(TOOL_DOCUMENT));
Display::display_header($nameTools, "Doc"); Display::display_header($nameTools, "Doc");

@ -40,13 +40,10 @@ if (!$is_allowed_to_edit) {
api_not_allowed(true); api_not_allowed(true);
} }
$noPHP_SELF = true;
//what's the current path? //what's the current path?
$path = '/';
if (isset($_REQUEST['curdirpath'])) { if (isset($_REQUEST['curdirpath'])) {
$path = $_REQUEST['curdirpath']; $path = $_REQUEST['curdirpath'];
} else {
$path = '/';
} }
$toolFromSession = Session::read('my_tool'); $toolFromSession = Session::read('my_tool');

@ -14,7 +14,6 @@ $_course = api_get_course_info();
$courseDir = $_course['path']."/document"; $courseDir = $_course['path']."/document";
$sys_course_path = api_get_path(SYS_COURSE_PATH); $sys_course_path = api_get_path(SYS_COURSE_PATH);
$base_work_dir = $sys_course_path.$courseDir; $base_work_dir = $sys_course_path.$courseDir;
$noPHP_SELF = true;
$max_filled_space = DocumentManager::get_course_quota(); $max_filled_space = DocumentManager::get_course_quota();
//what's the current path? //what's the current path?

@ -268,8 +268,6 @@ if ($allowTutors == 'true') {
$firstLetterUser = $firstLetterSession = ''; $firstLetterUser = $firstLetterSession = '';
$UserList = $SessionList = array(); $UserList = $SessionList = array();
$sessions = array(); $sessions = array();
$noPHP_SELF = true;
if (isset($_POST['form_sent']) && $_POST['form_sent']) { if (isset($_POST['form_sent']) && $_POST['form_sent']) {
$form_sent = $_POST['form_sent']; $form_sent = $_POST['form_sent'];
$firstLetterUser = $_POST['firstLetterUser']; $firstLetterUser = $_POST['firstLetterUser'];

Loading…
Cancel
Save