]> git.mxchange.org Git - friendica.git/blobdiff - mod/settings.php
Fix formatting in mod/help
[friendica.git] / mod / settings.php
index cd45cc50705e69507aae4727933edaf1691dfa32..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'];
@@ -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;
        }