diff --git a/main/document/document.inc.php b/main/document/document.inc.php index d85d13e0dc..536c77c185 100755 --- a/main/document/document.inc.php +++ b/main/document/document.inc.php @@ -212,7 +212,10 @@ function create_document_link( $send_to = null; if (!$show_as_icon) { if ($filetype == 'folder') { - if (api_is_allowed_to_edit() || api_is_platform_admin() || api_get_setting('students_download_folders') == 'true') { + if (api_is_allowed_to_edit() || + api_is_platform_admin() || + api_get_setting('students_download_folders') == 'true' + ) { //filter when I am into shared folder, I can show for donwload only my shared folder if (is_shared_folder($curdirpath, $current_session_id)) { if (preg_match('/shared_folder\/sf_user_' . api_get_user_id() . '$/', urldecode($forcedownload_link)) || diff --git a/main/document/slideshow.php b/main/document/slideshow.php index 9de3cd119f..d956352916 100755 --- a/main/document/slideshow.php +++ b/main/document/slideshow.php @@ -15,7 +15,7 @@ api_protect_course_script(); $noPHP_SELF = true; $path = Security::remove_XSS($_GET['curdirpath']); $pathurl = urlencode($path); -$slide_id = Security::remove_XSS($_GET['slide_id']); +$slide_id = isset($_GET['slide_id']) ? Security::remove_XSS($_GET['slide_id']) : null; if (empty($slide_id)) { $edit_slide_id = 1; @@ -423,7 +423,7 @@ if ($slide_id != 'all' && !empty($image_files_only)) { list($width, $height) = getimagesize($image); //auto resize - if ($_SESSION["image_resizing"]!="noresizing" && $_SESSION["image_resizing"]!="resizing" ) { + if ($_SESSION["image_resizing"] !="noresizing" && $_SESSION["image_resizing"]!="resizing") { ?>