]> git.mxchange.org Git - friendica.git/blobdiff - mod/settings.php
Fix undefined index notice messages in mod/install
[friendica.git] / mod / settings.php
index 48c217bc42c65e7b8feef4472ad68f9bc0d88787..34e9ce41ec0f7e780e403f5d6ad190b25396e7f8 100644 (file)
@@ -26,12 +26,14 @@ use Friendica\Util\Temporal;
 function get_theme_config_file($theme)
 {
        $a = get_app();
-       $base_theme = $a->theme_info['extends'];
+       if (!empty($a->theme_info['extends'])) {
+               $base_theme = $a->theme_info['extends'];
+       }
 
        if (file_exists("view/theme/$theme/config.php")) {
                return "view/theme/$theme/config.php";
        }
-       if (file_exists("view/theme/$base_theme/config.php")) {
+       if (!empty($base_theme) && file_exists("view/theme/$base_theme/config.php")) {
                return "view/theme/$base_theme/config.php";
        }
        return null;
@@ -509,9 +511,8 @@ function settings_post(App $a)
                        $err .= L10n::t('Invalid email.');
                }
                //  ensure new email is not the admin mail
-               //if ((x($a->config, 'admin_email')) && (strcasecmp($email, $a->config['admin_email']) == 0)) {
-               if (x($a->config, 'admin_email')) {
-                       $adminlist = explode(",", str_replace(" ", "", strtolower($a->config['admin_email'])));
+               if (Config::get('config', 'admin_email')) {
+                       $adminlist = explode(",", str_replace(" ", "", strtolower(Config::get('config', 'admin_email'))));
                        if (in_array(strtolower($email), $adminlist)) {
                                $err .= L10n::t('Cannot change to that email.');
                                $email = $a->user['email'];
@@ -966,7 +967,7 @@ function settings_content(App $a)
                        '$noinfo'       => ['noinfo', L10n::t("Don't show notices"), $noinfo, ''],
                        '$infinite_scroll'      => ['infinite_scroll', L10n::t("Infinite scroll"), $infinite_scroll, ''],
                        '$no_auto_update'       => ['no_auto_update', L10n::t("Automatic updates only at the top of the network page"), $no_auto_update, L10n::t('When disabled, the network page is updated all the time, which could be confusing while reading.')],
-                       '$bandwidth_saver' => ['bandwidth_saver', L10n::t('Bandwith Saver Mode'), $bandwidth_saver, L10n::t('When enabled, embedded content is not displayed on automatic updates, they only show on page reload.')],
+                       '$bandwidth_saver' => ['bandwidth_saver', L10n::t('Bandwidth Saver Mode'), $bandwidth_saver, L10n::t('When enabled, embedded content is not displayed on automatic updates, they only show on page reload.')],
                        '$smart_threading' => ['smart_threading', L10n::t('Smart Threading'), $smart_threading, L10n::t('When enabled, suppress extraneous thread indentation while keeping it where it matters. Only works if threading is available and enabled.')],
 
                        '$d_tset' => L10n::t('General Theme Settings'),
@@ -1091,13 +1092,13 @@ function settings_content(App $a)
                $profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />';
        } else {
                $profile_in_dir = replace_macros($opt_tpl, [
-                       '$field' => ['profile_in_directory', L10n::t('Publish your default profile in your local site directory?'), $profile['publish'], L10n::t('Your profile will be published in the global friendica directories (e.g. <a href="%s">%s</a>). Your profile will be visible in public.', Config::get('system', 'directory'), Config::get('system', 'directory')), [L10n::t('No'), L10n::t('Yes')]]
+                       '$field' => ['profile_in_directory', L10n::t('Publish your default profile in your local site directory?'), $profile['publish'], L10n::t('Your profile will be published in this node\'s <a href="%s">local directory</a>. Your profile details may be publicly visible depending on the system settings.', System::baseUrl().'/directory'), [L10n::t('No'), L10n::t('Yes')]]
                ]);
        }
 
        if (strlen(Config::get('system', 'directory'))) {
                $profile_in_net_dir = replace_macros($opt_tpl, [
-                       '$field' => ['profile_in_netdirectory', L10n::t('Publish your default profile in the global social directory?'), $profile['net-publish'], L10n::t('Your profile will be published in this node\'s <a href="%s">local directory</a>. Your profile details may be publicly visible depending on the system settings.', System::baseUrl().'/directory'), [L10n::t('No'), L10n::t('Yes')]]
+                       '$field' => ['profile_in_netdirectory', L10n::t('Publish your default profile in the global social directory?'), $profile['net-publish'], L10n::t('Your profile will be published in the global friendica directories (e.g. <a href="%s">%s</a>). Your profile will be visible in public.', Config::get('system', 'directory'), Config::get('system', 'directory')), [L10n::t('No'), L10n::t('Yes')]]
                ]);
        } else {
                $profile_in_net_dir = '';
@@ -1108,7 +1109,7 @@ function settings_content(App $a)
        ]);
 
        $hide_wall = replace_macros($opt_tpl, [
-               '$field' => ['hidewall', L10n::t('Hide your profile details from anonymous viewers?'), $a->user['hidewall'], L10n::t('Anonymous visitors will only see your profile picture, your display name and the nickname you are using on your profile page. Disables posting public messages to Diaspora and other networks.'), [L10n::t('No'), L10n::t('Yes')]],
+               '$field' => ['hidewall', L10n::t('Hide your profile details from anonymous viewers?'), $a->user['hidewall'], L10n::t('Anonymous visitors will only see your profile picture, your display name and the nickname you are using on your profile page. Your public posts and replies will still be accessible by other means.'), [L10n::t('No'), L10n::t('Yes')]],
        ]);
 
        $blockwall = replace_macros($opt_tpl, [
@@ -1155,7 +1156,7 @@ function settings_content(App $a)
 
        // Private/public post links for the non-JS ACL form
        $private_post = 1;
-       if ($_REQUEST['public']) {
+       if (!empty($_REQUEST['public']) && !$_REQUEST['public']) {
                $private_post = 0;
        }