X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsettings.php;h=34e9ce41ec0f7e780e403f5d6ad190b25396e7f8;hb=4161908f43a6861884ee23a17257da843aa8b22f;hp=cd45cc50705e69507aae4727933edaf1691dfa32;hpb=78114c13d5ce27b36682a960859056d4ebf9d9be;p=friendica.git diff --git a/mod/settings.php b/mod/settings.php index cd45cc5070..34e9ce41ec 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -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']; @@ -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; }