mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 14:58:42 +00:00
fix app setup
This commit is contained in:
parent
d62222507a
commit
db0908bad8
|
|
@ -152,14 +152,23 @@ final class ApplicationManager
|
||||||
*/
|
*/
|
||||||
private function installTheme(string $destination, string $theme) : void
|
private function installTheme(string $destination, string $theme) : void
|
||||||
{
|
{
|
||||||
if (\is_dir($destination . '/css')) {
|
if (!\is_dir($path = $destination . '/Themes/' . $theme)) {
|
||||||
Directory::delete($destination . '/css');
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (\is_dir($destination . '/Themes/' . $theme . '/css')) {
|
$dirs = \scandir($path);
|
||||||
|
foreach ($dirs as $dir) {
|
||||||
|
if (!\is_dir($path. '/' . $dir) || $dir === '.' || $dir === '..') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (\is_dir($destination . '/' . $dir)) {
|
||||||
|
Directory::delete($destination . '/' . $dir);
|
||||||
|
}
|
||||||
|
|
||||||
Directory::copy(
|
Directory::copy(
|
||||||
$destination . '/Themes/' . $theme . '/css',
|
$destination . '/Themes/' . $theme . '/' . $dir,
|
||||||
$destination . '/css',
|
$destination . '/' . $dir,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user