Skip to content

Commit

Permalink
kcfinder: fix display thumbs with parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
yashodha committed Aug 24, 2020
1 parent 6978078 commit 109fa9c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions patches/kcfinder_thumbs_parentheses.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
If you upload the same file twice, the second upload has a (1) at the end of the filename
This patch allows kcfinder to display thumbs for such names in the browser window
(and fixes rihgt-click delete action on these files as well)

--- a/packages/kcfinder/core/class/uploader.php
+++ b/packages/kcfinder/core/class/uploader.php
@@ -430,7 +430,7 @@
(
isset($this->config['_normalizeFilenames']) &&
$this->config['_normalizeFilenames'] &&
- preg_match('/[^0-9a-z\.\- _]/si', $file)
+ preg_match('/[^0-9a-z()\.\- _]/si', $file)
)
)
return false;

0 comments on commit 109fa9c

Please sign in to comment.