Skip to content

Commit 8f6a4cd

Browse files
committed
Fixed bug
Fixed bug bricking your instance if you delete themes if no theme is left
1 parent 59f74bf commit 8f6a4cd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

app/Http/Controllers/AdminController.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,13 @@ public function deleteTheme(request $request)
246246

247247
$del = $request->deltheme;
248248

249+
if (empty($del)) {
250+
echo '<script type="text/javascript">';
251+
echo 'alert("No themes to delete!");';
252+
echo 'window.location.href = "../studio/theme";';
253+
echo '</script>';
254+
} else {
255+
249256
$folderName = base_path() . '/themes/' . $del;
250257

251258

@@ -292,7 +299,7 @@ function removeFolder($folderName) {
292299
removeFolder($folderName);
293300

294301
return Redirect('/panel/theme');
295-
}
302+
}}
296303

297304
//Shows config file editor page
298305
public function showThemes(request $request)

0 commit comments

Comments
 (0)