X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fadmin.php;h=8bddd8ce88ae6c492a2b87bcef95c28e74169f8e;hb=8b20af6ef536e34c3bc9c412cbffa4cf9c0cea53;hp=99f72020def4fdaf2ec5349f839902c70ef56a1e;hpb=56cd53665214a77be9bf191099e48faad3d06288;p=friendica.git diff --git a/mod/admin.php b/mod/admin.php index 99f72020de..8bddd8ce88 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -308,6 +308,7 @@ function admin_page_site_post(&$a){ // end relocate $sitename = ((x($_POST,'sitename')) ? notags(trim($_POST['sitename'])) : ''); + $hostname = ((x($_POST,'hostname')) ? notags(trim($_POST['hostname'])) : ''); $banner = ((x($_POST,'banner')) ? trim($_POST['banner']) : false); $info = ((x($_POST,'info')) ? trim($_POST['info']) : false); $language = ((x($_POST,'language')) ? notags(trim($_POST['language'])) : ''); @@ -354,6 +355,7 @@ function admin_page_site_post(&$a){ $ostatus_poll_interval = ((x($_POST,'ostatus_poll_interval')) ? intval(trim($_POST['ostatus_poll_interval'])) : 0); $diaspora_enabled = ((x($_POST,'diaspora_enabled')) ? True : False); $ssl_policy = ((x($_POST,'ssl_policy')) ? intval($_POST['ssl_policy']) : 0); + $force_ssl = ((x($_POST,'force_ssl')) ? True : False); $old_share = ((x($_POST,'old_share')) ? True : False); $hide_help = ((x($_POST,'hide_help')) ? True : False); $suppress_language = ((x($_POST,'suppress_language')) ? True : False); @@ -412,6 +414,7 @@ function admin_page_site_post(&$a){ set_config('system','poll_interval',$poll_interval); set_config('system','maxloadavg',$maxloadavg); set_config('config','sitename',$sitename); + set_config('config','hostname',$hostname); set_config('system','suppress_language',$suppress_language); if ($banner==""){ // don't know why, but del_config doesn't work... @@ -481,6 +484,7 @@ function admin_page_site_post(&$a){ set_config('system','diaspora_enabled', $diaspora_enabled); set_config('config','private_addons', $private_addons); + set_config('system','force_ssl', $force_ssl); set_config('system','old_share', $old_share); set_config('system','hide_help', $hide_help); set_config('system','use_fulltext_engine', $use_fulltext_engine); @@ -583,6 +587,9 @@ function admin_page_site(&$a) { SSL_POLICY_SELFSIGN => t("Self-signed certificate, use SSL for local links only (discouraged)") ); + if ($a->config['hostname'] == "") + $a->config['hostname'] = $a->get_hostname(); + $t = get_markup_template("admin_site.tpl"); return replace_macros($t, array( '$title' => t('Administration'), @@ -597,12 +604,14 @@ function admin_page_site(&$a) { '$baseurl' => $a->get_baseurl(true), // name, label, value, help string, extra data... '$sitename' => array('sitename', t("Site name"), htmlentities($a->config['sitename'], ENT_QUOTES), 'UTF-8'), + '$hostname' => array('hostname', t("Host name"), $a->config['hostname'], ""), '$banner' => array('banner', t("Banner/Logo"), $banner, ""), '$info' => array('info',t('Additional Info'), $info, t('For public servers: you can add additional information here that will be listed at dir.friendica.com/siteinfo.')), '$language' => array('language', t("System language"), get_config('system','language'), "", $lang_choices), '$theme' => array('theme', t("System theme"), get_config('system','theme'), t("Default system theme - may be over-ridden by user profiles - change theme settings"), $theme_choices), '$theme_mobile' => array('theme_mobile', t("Mobile system theme"), get_config('system','mobile-theme'), t("Theme for mobile devices"), $theme_choices_mobile), '$ssl_policy' => array('ssl_policy', t("SSL link policy"), (string) intval(get_config('system','ssl_policy')), t("Determines whether generated links should be forced to use SSL"), $ssl_choices), + '$force_ssl' => array('force_ssl', t("Force SSL"), get_config('system','force_ssl'), t("Force all Non-SSL requests to SSL - Attention: on some systems it could lead to endless loops.")), '$old_share' => array('old_share', t("Old style 'Share'"), get_config('system','old_share'), t("Deactivates the bbcode element 'share' for repeating items.")), '$hide_help' => array('hide_help', t("Hide help entry from navigation menu"), get_config('system','hide_help'), t("Hides the menu entry for the Help pages from the navigation menu. You can still access it calling /help directly.")), '$singleuser' => array('singleuser', t("Single user instance"), get_config('system','singleuser'), t("Make this instance multi-user or single-user for the named user"), $user_names),