*/
class Config
{
- /**
- * Deletes the given key from the system configuration.
- *
- * @param string $cat The category of the configuration value
- * @param string $key The configuration key to delete
- *
- * @return bool
- */
- public static function delete($cat, $key)
- {
- return DI::config()->delete($cat, $key);
- }
}
DI::config()->set('system', 'touch_icon' , $touch_icon);
if ($banner == "") {
- Config::delete('system', 'banner');
+ DI::config()->delete('system', 'banner');
} else {
DI::config()->set('system', 'banner', $banner);
}
if (empty($additional_info)) {
- Config::delete('config', 'info');
+ DI::config()->delete('config', 'info');
} else {
DI::config()->set('config', 'info', $additional_info);
}
Theme::install($theme);
if ($theme_mobile == '---') {
- Config::delete('system', 'mobile-theme');
+ DI::config()->delete('system', 'mobile-theme');
} else {
DI::config()->set('system', 'mobile-theme', $theme_mobile);
}
if ($singleuser == '---') {
- Config::delete('system', 'singleuser');
+ DI::config()->delete('system', 'singleuser');
} else {
DI::config()->set('system', 'singleuser', $singleuser);
}
if (strlen(DI::config()->get('system', 'directory_submit_url')) &&
!strlen(DI::config()->get('system', 'directory'))) {
DI::config()->set('system', 'directory', dirname(DI::config()->get('system', 'directory_submit_url')));
- Config::delete('system', 'directory_submit_url');
+ DI::config()->delete('system', 'directory_submit_url');
}
/* Installed themes */
if (strlen(DI::config()->get('system', 'directory_submit_url')) &&
!strlen(DI::config()->get('system', 'directory'))) {
DI::config()->set('system', 'directory', dirname(DI::config()->get('system', 'directory_submit_url')));
- Config::delete('system', 'directory_submit_url');
+ DI::config()->delete('system', 'directory_submit_url');
}
return Update::SUCCESS;
}
// try to delete the class since it isn't needed. This won't work with config files
- Config::delete('storage', 'class');
+ DI::config()->delete('storage', 'class');
}
// Update attachments and photos