Fixed bug

Fixed bug bricking your instance if you delete themes if no theme is left
This commit is contained in:
Julian Prieber 2022-07-05 10:30:25 +02:00
parent 59f74bfe47
commit 8f6a4cdb30
1 changed files with 8 additions and 1 deletions

View File

@ -246,6 +246,13 @@ class AdminController extends Controller
$del = $request->deltheme; $del = $request->deltheme;
if (empty($del)) {
echo '<script type="text/javascript">';
echo 'alert("No themes to delete!");';
echo 'window.location.href = "../studio/theme";';
echo '</script>';
} else {
$folderName = base_path() . '/themes/' . $del; $folderName = base_path() . '/themes/' . $del;
@ -292,7 +299,7 @@ class AdminController extends Controller
removeFolder($folderName); removeFolder($folderName);
return Redirect('/panel/theme'); return Redirect('/panel/theme');
} }}
//Shows config file editor page //Shows config file editor page
public function showThemes(request $request) public function showThemes(request $request)