mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 18:54:37 -04:00
v5.3.84
This commit is contained in:
parent
9c0b81f7dd
commit
6d14e290b6
@ -111,6 +111,7 @@ class SelfUpdateController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->testWritable();
|
$this->testWritable();
|
||||||
|
$this->clearCacheDir();
|
||||||
|
|
||||||
copy($this->getDownloadUrl(), storage_path('app/invoiceninja.zip'));
|
copy($this->getDownloadUrl(), storage_path('app/invoiceninja.zip'));
|
||||||
|
|
||||||
@ -158,6 +159,19 @@ class SelfUpdateController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function clearCacheDir()
|
||||||
|
{
|
||||||
|
|
||||||
|
$directoryIterator = new \RecursiveDirectoryIterator(base_path('bootstrap/cache'), \RecursiveDirectoryIterator::SKIP_DOTS);
|
||||||
|
|
||||||
|
foreach (new \RecursiveIteratorIterator($directoryIterator) as $file) {
|
||||||
|
|
||||||
|
unlink(base_path('bootstrap/cache/').$file->getFileName());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private function testWritable()
|
private function testWritable()
|
||||||
{
|
{
|
||||||
$directoryIterator = new \RecursiveDirectoryIterator(base_path(), \RecursiveDirectoryIterator::SKIP_DOTS);
|
$directoryIterator = new \RecursiveDirectoryIterator(base_path(), \RecursiveDirectoryIterator::SKIP_DOTS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user