summaryrefslogtreecommitdiffstats
path: root/lib/private/Template/SCSSCacher.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-01-26 17:46:42 +0100
committerJulius Härtl <jus@bitgrid.net>2018-02-03 15:21:51 +0100
commit7381a81d3041a3460617623028d6e8cfb5391649 (patch)
tree5bee0985b80aa30bf7d925cbee589e8da74d19fc /lib/private/Template/SCSSCacher.php
parent79e81c15c5beb4174922921083f0e838de9a3bfc (diff)
downloadnextcloud-server-7381a81d3041a3460617623028d6e8cfb5391649.tar.gz
nextcloud-server-7381a81d3041a3460617623028d6e8cfb5391649.zip
Add repair step to clear frontend related caches
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Template/SCSSCacher.php')
-rw-r--r--lib/private/Template/SCSSCacher.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/Template/SCSSCacher.php b/lib/private/Template/SCSSCacher.php
index 8830a651f36..eee437eaf62 100644
--- a/lib/private/Template/SCSSCacher.php
+++ b/lib/private/Template/SCSSCacher.php
@@ -249,9 +249,10 @@ class SCSSCacher {
$depFile->putContent($deps);
$this->depsCache->set($folder->getName() . '-' . $depFileName, $deps);
$gzipFile->putContent(gzencode($data, 9));
- $this->logger->debug($webDir.'/'.$fileNameSCSS.' compiled and successfully cached', ['app' => 'core']);
+ $this->logger->debug('SCSSCacher: '.$webDir.'/'.$fileNameSCSS.' compiled and successfully cached', ['app' => 'core']);
return true;
} catch(NotPermittedException $e) {
+ $this->logger->error('SCSSCacher: unable to cache: ' . $fileNameSCSS);
return false;
}
}
@@ -260,7 +261,7 @@ class SCSSCacher {
* Reset scss cache by deleting all generated css files
* We need to regenerate all files when variables change
*/
- private function resetCache() {
+ public function resetCache() {
$this->injectedVariables = null;
$appDirectory = $this->appData->getDirectoryListing();
if(empty($appDirectory)){
@@ -268,9 +269,7 @@ class SCSSCacher {
}
foreach ($appDirectory as $folder) {
foreach ($folder->getDirectoryListing() as $file) {
- if (substr($file->getName(), -3) === 'css' || substr($file->getName(), -4) === 'deps') {
- $file->delete();
- }
+ $file->delete();
}
}
}