Skip to content

Commit

Permalink
Fix clear all with $targetFolder
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdekruijk committed Mar 3, 2017
1 parent d1460f2 commit 3789b86
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions images/imageresize.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
# Clear all resized images for the template if any
if (isset($_GET['clear'])) {
if ($_GET['clear']=='all')
foreach($templates as $name=>$template)
deleteDir($name);
if (!empty($targetFolder))
deleteDir($targetFolder);
else
foreach($templates as $name=>$template)
deleteDir($name);
elseif (isset($templates[$_GET['clear']]))
deleteDir($_GET['clear']);
die('Cleared');
Expand Down

0 comments on commit 3789b86

Please sign in to comment.