Skip to content

Commit

Permalink
fix duplicate file minification, bcosca/fatfree#1152, #bcosca/fatfree…
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkez committed Nov 27, 2019
1 parent 6546ccd commit 7c7b475
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web.php
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,12 @@ function minify($files,$mime=NULL,$header=TRUE,$path=NULL) {
$dst='';
if (!isset($path))
$path=$fw->UI.';./';
foreach ($fw->split($path,FALSE) as $dir)
foreach ($files as $file)
foreach (array_unique($fw->split($path,FALSE)) as $dir)
foreach ($files as $i=>$file)
if (is_file($save=$fw->fixslashes($dir.$file)) &&
is_bool(strpos($save,'../')) &&
preg_match('/\.(css|js)$/i',$file)) {
unset($files[$i]);
if ($fw->CACHE &&
($cached=$cache->exists(
$hash=$fw->hash($save).'.'.$ext[0],$data)) &&
Expand Down

0 comments on commit 7c7b475

Please sign in to comment.