Skip to content

Commit

Permalink
Bugfix: Installer - missing var
Browse files Browse the repository at this point in the history
Bugfix: Style/ JS-Caching
  • Loading branch information
stefan committed Aug 31, 2019
1 parent 90e7912 commit 90ae3aa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
6 changes: 3 additions & 3 deletions core/js/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}

header("Content-Type: application/javascript");
if (!FPCM_NOJSCSSPHP_FILESIZE_HEADER) {
header("Content-Length: ".$data['filesize']);
}
//if (!FPCM_NOJSCSSPHP_FILESIZE_HEADER) {
header("Content-Length: ".$data['filesize']);
//}
exit($data['content']);
17 changes: 7 additions & 10 deletions core/theme/style.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,22 @@

foreach (glob(__DIR__.'/*.css') as $cssFile) {

$fileContent = '/* '.\fpcm\model\files\ops::removeBaseDir($cssFile).' */'.PHP_EOL.file_get_contents($cssFile).PHP_EOL.PHP_EOL;
$contentSize = strlen($fileContent);

$fileContent = file_get_contents($cssFile);
if (!$fileContent) {
continue;
}

$data['content'] .= $fileContent;
$data['filesize'] += (filesize($cssFile) + $contentSize);

$data['content'] .= '/* '.\fpcm\model\files\ops::removeBaseDir($cssFile).' */'.PHP_EOL.$fileContent.PHP_EOL.PHP_EOL;
}

$cache->write($cacheName, $data, FPCM_LANGCACHE_TIMEOUT);
$data['filesize'] = strlen($data['content']);
$cache->write($cacheName, $data);
} else {
$data = $cache->read($cacheName);
}

header("Content-Type: text/css");
if (!FPCM_NOJSCSSPHP_FILESIZE_HEADER) {
header("Content-Length: ".$data['filesize']);
}
//if (!FPCM_NOJSCSSPHP_FILESIZE_HEADER) {
header("Content-Length: ".$data['filesize']);
//}
exit($data['content']);
1 change: 1 addition & 0 deletions inc/controller/action/installer/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ protected function runStep6()
$this->view->assign('avatar', false);
$this->view->assign('externalSave', true);
$this->view->assign('inProfile', false);
$this->view->assign('twoFaAuth', false);
$this->view->addJsLangVars(['SAVE_FAILED_PASSWORD_SECURITY', 'SAVE_FAILED_PASSWORD_SECURITY_PWNDPASS']);

if ($msg === null) {
Expand Down

0 comments on commit 90ae3aa

Please sign in to comment.