mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:10:10 +00:00
The notice and info have been moved
This commit is contained in:
parent
20291ddc2b
commit
fdfa1f8630
73 changed files with 273 additions and 284 deletions
|
@ -36,7 +36,7 @@ class Details extends BaseAdmin
|
|||
|
||||
$theme = Strings::sanitizeFilePathItem($this->parameters['theme']);
|
||||
if (!is_dir("view/theme/$theme")) {
|
||||
notice(DI::l10n()->t("Item not found."));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t("Item not found."));
|
||||
return '';
|
||||
}
|
||||
|
||||
|
@ -54,11 +54,11 @@ class Details extends BaseAdmin
|
|||
|
||||
if ($isEnabled) {
|
||||
Theme::uninstall($theme);
|
||||
info(DI::l10n()->t('Theme %s disabled.', $theme));
|
||||
DI::sysmsg()->addInfo(DI::l10n()->t('Theme %s disabled.', $theme));
|
||||
} elseif (Theme::install($theme)) {
|
||||
info(DI::l10n()->t('Theme %s successfully enabled.', $theme));
|
||||
DI::sysmsg()->addInfo(DI::l10n()->t('Theme %s successfully enabled.', $theme));
|
||||
} else {
|
||||
notice(DI::l10n()->t('Theme %s failed to install.', $theme));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Theme %s failed to install.', $theme));
|
||||
}
|
||||
|
||||
DI::baseUrl()->redirect('admin/themes/' . $theme);
|
||||
|
|
|
@ -77,7 +77,7 @@ class Embed extends BaseAdmin
|
|||
|
||||
$theme = Strings::sanitizeFilePathItem($this->parameters['theme']);
|
||||
if (!is_dir("view/theme/$theme")) {
|
||||
notice($this->t('Unknown theme.'));
|
||||
DI::sysmsg()->addNotice($this->t('Unknown theme.'));
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class Index extends BaseAdmin
|
|||
}
|
||||
Theme::setAllowedList($allowed_themes);
|
||||
|
||||
info(DI::l10n()->t('Themes reloaded'));
|
||||
DI::sysmsg()->addInfo(DI::l10n()->t('Themes reloaded'));
|
||||
break;
|
||||
|
||||
case 'toggle' :
|
||||
|
@ -56,17 +56,17 @@ class Index extends BaseAdmin
|
|||
if ($theme) {
|
||||
$theme = Strings::sanitizeFilePathItem($theme);
|
||||
if (!is_dir("view/theme/$theme")) {
|
||||
notice(DI::l10n()->t('Item not found.'));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Item not found.'));
|
||||
return '';
|
||||
}
|
||||
|
||||
if (in_array($theme, Theme::getAllowedList())) {
|
||||
Theme::uninstall($theme);
|
||||
info(DI::l10n()->t('Theme %s disabled.', $theme));
|
||||
DI::sysmsg()->addInfo(DI::l10n()->t('Theme %s disabled.', $theme));
|
||||
} elseif (Theme::install($theme)) {
|
||||
info(DI::l10n()->t('Theme %s successfully enabled.', $theme));
|
||||
DI::sysmsg()->addInfo(DI::l10n()->t('Theme %s successfully enabled.', $theme));
|
||||
} else {
|
||||
notice(DI::l10n()->t('Theme %s failed to install.', $theme));
|
||||
DI::sysmsg()->addNotice(DI::l10n()->t('Theme %s failed to install.', $theme));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue