mirror of
https://github.com/processwire/processwire.git
synced 2025-08-18 04:22:10 +02:00
Fix issue processwire/processwire-issues#523 prevent user from uninstalling admin themes defined by $config->defaultAdminTheme
This commit is contained in:
@@ -312,6 +312,14 @@ abstract class AdminTheme extends WireData implements Module {
|
||||
}
|
||||
|
||||
public function ___uninstall() {
|
||||
|
||||
$defaultAdminTheme = $this->wire('config')->defaultAdminTheme;
|
||||
if($defaultAdminTheme == $this->className()) {
|
||||
throw new WireException(
|
||||
"Cannot uninstall this admin theme because \$config->defaultAdminTheme = '$defaultAdminTheme'; " .
|
||||
"Please add this setting with a different value in /site/config.php"
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
if(self::$numAdminThemes > 1) return;
|
||||
|
Reference in New Issue
Block a user