Merge pull request #6542 from MrPetovan/bug/fix-additional-info-setting

Rename conflicted variable $info in admin settings
2022.09-rc
Tobias Diekershoff 2019-01-29 06:22:13 +01:00 zatwierdzone przez GitHub
commit 8a5418ebee
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -1104,7 +1104,7 @@ function admin_page_site_post(App $a)
$banner = (!empty($_POST['banner']) ? trim($_POST['banner']) : false);
$shortcut_icon = (!empty($_POST['shortcut_icon']) ? Strings::escapeTags(trim($_POST['shortcut_icon'])) : '');
$touch_icon = (!empty($_POST['touch_icon']) ? Strings::escapeTags(trim($_POST['touch_icon'])) : '');
$info = (!empty($_POST['info']) ? trim($_POST['info']) : false);
$additional_info = (!empty($_POST['additional_info']) ? trim($_POST['additional_info']) : '');
$language = (!empty($_POST['language']) ? Strings::escapeTags(trim($_POST['language'])) : '');
$theme = (!empty($_POST['theme']) ? Strings::escapeTags(trim($_POST['theme'])) : '');
$theme_mobile = (!empty($_POST['theme_mobile']) ? Strings::escapeTags(trim($_POST['theme_mobile'])) : '');
@ -1300,10 +1300,10 @@ function admin_page_site_post(App $a)
Config::set('system', 'banner', $banner);
}
if (empty($info)) {
if (empty($additional_info)) {
Config::delete('config', 'info');
} else {
Config::set('config', 'info', $info);
Config::set('config', 'info', $additional_info);
}
Config::set('system', 'language', $language);
Config::set('system', 'theme', $theme);
@ -1501,7 +1501,7 @@ function admin_page_site(App $a)
$banner = '<a href="https://friendi.ca"><img id="logo-img" src="images/friendica-32.png" alt="logo" /></a><span id="logo-text"><a href="https://friendi.ca">Friendica</a></span>';
}
$info = Config::get('config', 'info');
$additional_info = Config::get('config', 'info');
// Automatically create temporary paths
get_temppath();
@ -1594,7 +1594,7 @@ function admin_page_site(App $a)
'$banner' => ['banner', L10n::t("Banner/Logo"), $banner, ""],
'$shortcut_icon' => ['shortcut_icon', L10n::t("Shortcut icon"), Config::get('system', 'shortcut_icon'), L10n::t("Link to an icon that will be used for browsers.")],
'$touch_icon' => ['touch_icon', L10n::t("Touch icon"), Config::get('system', 'touch_icon'), L10n::t("Link to an icon that will be used for tablets and mobiles.")],
'$info' => ['info', L10n::t('Additional Info'), $info, L10n::t('For public servers: you can add additional information here that will be listed at %s/servers.', get_server())],
'$additional_info' => ['additional_info', L10n::t('Additional Info'), $additional_info, L10n::t('For public servers: you can add additional information here that will be listed at %s/servers.', get_server())],
'$language' => ['language', L10n::t("System language"), Config::get('system', 'language'), "", $lang_choices],
'$theme' => ['theme', L10n::t("System theme"), Config::get('system', 'theme'), L10n::t("Default system theme - may be over-ridden by user profiles - <a href='#' id='cnftheme'>change theme settings</a>"), $theme_choices],
'$theme_mobile' => ['theme_mobile', L10n::t("Mobile system theme"), Config::get('system', 'mobile-theme', '---'), L10n::t("Theme for mobile devices"), $theme_choices_mobile],

Wyświetl plik

@ -51,7 +51,7 @@
{{include file="field_textarea.tpl" field=$banner}}
{{include file="field_input.tpl" field=$shortcut_icon}}
{{include file="field_input.tpl" field=$touch_icon}}
{{include file="field_textarea.tpl" field=$info}}
{{include file="field_textarea.tpl" field=$additional_info}}
{{include file="field_select.tpl" field=$language}}
{{include file="field_select.tpl" field=$theme}}
{{include file="field_select.tpl" field=$theme_mobile}}

Wyświetl plik

@ -80,7 +80,7 @@
{{include file="field_textarea.tpl" field=$banner}}
{{include file="field_input.tpl" field=$shortcut_icon}}
{{include file="field_input.tpl" field=$touch_icon}}
{{include file="field_textarea.tpl" field=$info}}
{{include file="field_textarea.tpl" field=$additional_info}}
{{include file="field_select.tpl" field=$language}}
{{include file="field_select.tpl" field=$theme}}
{{include file="field_select.tpl" field=$theme_mobile}}