Skip to content

Commit

Permalink
Revert "fix duplicate UI path rendering, fixes bcosca/fatfree#1152"
Browse files Browse the repository at this point in the history
This reverts commit 46f6b44.
  • Loading branch information
ikkez committed Nov 27, 2019
1 parent 20245ca commit 6546ccd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions base.php
Original file line number Diff line number Diff line change
Expand Up @@ -2888,7 +2888,7 @@ protected function sandbox(array $hive=NULL,$mime=NULL) {
function render($file,$mime='text/html',array $hive=NULL,$ttl=0) {
$fw=$this->fw;
$cache=Cache::instance();
foreach (array_unique($fw->split($fw->UI)) as $dir) {
foreach ($fw->split($fw->UI) as $dir) {
if ($cache->exists($hash=$fw->hash($dir.$file),$data))
return $data;
if (is_file($this->file=$fw->fixslashes($dir.$file))) {
Expand Down Expand Up @@ -3100,7 +3100,7 @@ function render($file,$mime='text/html',array $hive=NULL,$ttl=0) {
$cache=Cache::instance();
if (!is_dir($tmp=$fw->TEMP))
mkdir($tmp,Base::MODE,TRUE);
foreach (array_unique($fw->split($fw->UI)) as $dir) {
foreach ($fw->split($fw->UI) as $dir) {
if ($cache->exists($hash=$fw->hash($dir.$file),$data))
return $data;
if (is_file($view=$fw->fixslashes($dir.$file))) {
Expand Down
3 changes: 1 addition & 2 deletions web.php
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ function minify($files,$mime=NULL,$header=TRUE,$path=NULL) {
$dst='';
if (!isset($path))
$path=$fw->UI.';./';
foreach (array_unique($fw->split($path,FALSE)) as $dir)
foreach ($fw->split($path,FALSE) as $dir)
foreach ($files as $file)
if (is_file($save=$fw->fixslashes($dir.$file)) &&
is_bool(strpos($save,'../')) &&
Expand Down Expand Up @@ -815,7 +815,6 @@ function minify($files,$mime=NULL,$header=TRUE,$path=NULL) {
$cache->set($hash,$data);
$dst.=$data;
}
break;
}
if (PHP_SAPI!='cli' && $header)
header('Content-Type: '.$mime.'; charset='.$fw->ENCODING);
Expand Down

0 comments on commit 6546ccd

Please sign in to comment.