Improved compatibility
This commit is contained in:
parent
a78d471374
commit
d1d1e86993
|
@ -489,38 +489,12 @@ public function SendTestMail(Request $request)
|
|||
|
||||
function removeFolder($folderName)
|
||||
{
|
||||
|
||||
if (is_dir($folderName))
|
||||
|
||||
$folderHandle = opendir($folderName);
|
||||
|
||||
|
||||
|
||||
if (!$folderHandle)
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
|
||||
while ($file = readdir($folderHandle)) {
|
||||
|
||||
if ($file != "." && $file != "..") {
|
||||
|
||||
if (!is_dir($folderName . "/" . $file))
|
||||
|
||||
unlink($folderName . "/" . $file);
|
||||
|
||||
else
|
||||
|
||||
removeFolder($folderName . '/' . $file);
|
||||
}
|
||||
if (File::exists($folderName)) {
|
||||
File::deleteDirectory($folderName);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
closedir($folderHandle);
|
||||
|
||||
rmdir($folderName);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
removeFolder($folderName);
|
||||
|
@ -621,7 +595,6 @@ public function SendTestMail(Request $request)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
return Redirect('/studio/theme');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue