From ed33fbf987efb439559fc496bfe3830c2051ca01 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 8 Apr 2018 11:18:18 +0200 Subject: [PATCH] 0.9.8 --- core/vendor/filemanager/dialog.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/vendor/filemanager/dialog.php b/core/vendor/filemanager/dialog.php index 077d1283..14e4dd5e 100755 --- a/core/vendor/filemanager/dialog.php +++ b/core/vendor/filemanager/dialog.php @@ -234,10 +234,17 @@ if (!isset($_GET['type'])){ $extensions=null; if (isset($_GET['extensions'])){ - $extensions = explode(',', urldecode($_GET['extensions'])); + $extensions = json_decode(urldecode($_GET['extensions'])); + $ext_tmp = array(); + foreach($extensions as $extension){ + $extension = fix_strtolower($extension); + if(in_array( $extension, $config['ext'])){ + $ext_tmp[]=$extension; + } + } if($extensions){ - $ext = $extensions; - $show_filter_buttons = false; + $ext = $ext_tmp; + $config['show_filter_buttons'] = false; } }