Minor - Format code, fix PHP warnings

1.10.x
Julio Montoya 10 years ago
parent 2a490fdc8f
commit 499096c404
  1. 16
      main/course_info/delete_course.php
  2. 5
      main/document/document.php

@ -26,18 +26,18 @@ if (!api_is_allowed_to_edit()) {
$tool_name = get_lang('DelCourse');
if (isset($_GET['delete']) && $_GET['delete'] == 'yes') {
CourseManager::delete_course($_course['sysCode']);
$obj_cat = new Category();
$obj_cat->update_category_delete($_course['sysCode']);
if (isset($_GET['delete']) && $_GET['delete'] == 'yes') {
CourseManager::delete_course($_course['sysCode']);
$obj_cat = new Category();
$obj_cat->update_category_delete($_course['sysCode']);
// DELETE CONFIRMATION MESSAGE
// DELETE CONFIRMATION MESSAGE
Session::erase('_cid');
Session::erase('_real_cid');
$noPHP_SELF = true;
$message = '<h2>'.get_lang('Course').' : '.$current_course_name.' ('.$current_course_code.') </h2>';
$noPHP_SELF = true;
$message = '<h2>'.get_lang('Course').' : '.$current_course_name.' ('.$current_course_code.') </h2>';
$message .=get_lang('HasDel');
$message .= '<br /><br /><a href="../../index.php">'.get_lang('BackHome').' '.api_get_setting('siteName').'</a>';
$message .= '<br /><br /><a href="../../index.php">'.get_lang('BackHome').' '.api_get_setting('siteName').'</a>';
} else {
$message = '<h3>'.get_lang('Course').' : '.$current_course_name.' ('.$current_course_code.') </h3>';

@ -879,7 +879,10 @@ if (!empty($documentAndFolders)) {
foreach ($documentAndFolders as $file) {
if ($file['filetype'] == 'file') {
$path_info = pathinfo($file['path']);
$extension = strtolower($path_info['extension']);
$extension = '';
if (!empty($path_info['extension'])) {
$extension = strtolower($path_info['extension']);
}
//@todo use a js loop to auto generate this code
if (in_array($extension, array('ogg', 'mp3', 'wav'))) {

Loading…
Cancel
Save