Fix PHP warnings

remotes/angel/1.11.x
jmontoyaa 8 years ago
parent dd43dff75b
commit 08f3634c1c
  1. 8
      main/document/create_document.php
  2. 6
      main/document/document_slideshow.inc.php

@ -495,8 +495,12 @@ if ($form->validate()) {
}
if ($fp = @fopen($filepath.$filename.'.'.$extension, 'w')) {
//$content = str_replace(api_get_path(WEB_COURSE_PATH), $_configuration['url_append'].'/courses/', $content);
$content = str_replace(api_get_path(WEB_COURSE_PATH), $_configuration['url_append'].api_get_path(REL_COURSE_PATH), $content);
$content = str_replace(
api_get_path(WEB_COURSE_PATH),
api_get_configuration_value('url_append').api_get_path(REL_COURSE_PATH),
$content
);
fputs($fp, $content);
fclose($fp);

@ -25,8 +25,6 @@
* too much things in one file , I decided to put the code for document.php here and to include this
* file into document.php
*/
$accepted_extensions = array('.jpg', '.jpeg', '.gif', '.png', '.bmp','.svg');
// Resetting the images of the slideshow = destroying the slideshow
if (isset($_GET['action']) && $_GET['action'] == 'exit_slideshow') {
$_SESSION['image_files_only'] = null;
@ -66,14 +64,14 @@ if ($tablename_column == 0) {
} else {
$tablename_column = intval($tablename_column) - 1;
}
$tablename_direction = isset($_GET['tablename_direction']) ? Security::remove_XSS($_GET['tablename_direction']) : 'ASC';
$image_files_only = sort_files($array_to_search);
$_SESSION['image_files_only'] = $image_files_only;
function sort_files($table)
{
global $tablename_direction, $accepted_extensions;
$tablename_direction = isset($_GET['tablename_direction']) ? Security::remove_XSS($_GET['tablename_direction']) : 'ASC';
$accepted_extensions = array('.jpg', '.jpeg', '.gif', '.png', '.bmp','.svg');
$temp = array();
foreach ($table as & $file_array) {

Loading…
Cancel
Save