]> git.mxchange.org Git - friendica.git/blobdiff - mod/admin.php
Merge pull request #6181 from JonnyTischbein/feature_admin_subsubpages
[friendica.git] / mod / admin.php
index e8717e6b2817f13090c3acb559db14784f14f32b..3a361b7b4432554629c6d3e3c2a458bcf18b27f5 100644 (file)
@@ -664,13 +664,17 @@ function admin_page_federation(App $a)
                                } while (!empty($parts) && ((strlen($part) >= 40) || (strlen($part) <= 3)));
 
                                if (!empty($part)) {
-                                       $compacted[$part] += $v[$key]['total'];
+                                       if (empty($compacted[$part])) {
+                                               $compacted[$part] = $v[$key]['total'];
+                                       } else {
+                                               $compacted[$part] += $v[$key]['total'];
+                                       }
                                }
                        }
 
                        $v = [];
-                       foreach ($compacted as $version => $total) {
-                               $v[] = ['version' => $version, 'total' => $total];
+                       foreach ($compacted as $version => $pl_total) {
+                               $v[] = ['version' => $version, 'total' => $pl_total];
                        }
                }
 
@@ -1163,6 +1167,7 @@ function admin_page_site_post(App $a)
        $relay_scope            =       ((x($_POST,'relay_scope'))              ? Strings::escapeTags(trim($_POST['relay_scope']))              : '');
        $relay_server_tags      =       ((x($_POST,'relay_server_tags'))        ? Strings::escapeTags(trim($_POST['relay_server_tags']))        : '');
        $relay_user_tags        =       ((x($_POST,'relay_user_tags'))          ? True                                          : False);
+       $active_panel           =       (defaults($_POST, 'active_panel', '')   ? "#" . Strings::escapeTags(trim($_POST['active_panel'])) : '');
 
        // Has the directory url changed? If yes, then resubmit the existing profiles there
        if ($global_directory != Config::get('system', 'directory') && ($global_directory != '')) {
@@ -1344,7 +1349,8 @@ function admin_page_site_post(App $a)
        Config::set('system', 'rino_encrypt', $rino);
 
        info(L10n::t('Site settings updated.') . EOL);
-       $a->internalRedirect('admin/site');
+
+       $a->internalRedirect('admin/site' . $active_panel);
        return; // NOTREACHED
 }
 
@@ -1490,7 +1496,8 @@ function admin_page_site(App $a)
                '$performance' => L10n::t('Performance'),
                '$worker_title' => L10n::t('Worker'),
                '$relay_title' => L10n::t('Message Relay'),
-               '$relocate' => L10n::t('Relocate - WARNING: advanced function. Could make this server unreachable.'),
+               '$relocate' => L10n::t('Relocate Instance'),
+               '$relocate_warning' => L10n::t('Warning! Advanced function. Could make this server unreachable.'),
                '$baseurl' => System::baseUrl(true),
                // name, label, value, help string, extra data...
                '$sitename'             => ['sitename', L10n::t("Site name"), Config::get('config', 'sitename'),''],
@@ -1564,7 +1571,7 @@ function admin_page_site(App $a)
                '$dbclean'              => ['dbclean', L10n::t("Clean database"), Config::get('system','dbclean', false), L10n::t("Remove old remote items, orphaned database records and old content from some other helper tables.")],
                '$dbclean_expire_days'  => ['dbclean_expire_days', L10n::t("Lifespan of remote items"), Config::get('system','dbclean-expire-days', 0), L10n::t("When the database cleanup is enabled, this defines the days after which remote items will be deleted. Own items, and marked or filed items are always kept. 0 disables this behaviour.")],
                '$dbclean_unclaimed'    => ['dbclean_unclaimed', L10n::t("Lifespan of unclaimed items"), Config::get('system','dbclean-expire-unclaimed', 90), L10n::t("When the database cleanup is enabled, this defines the days after which unclaimed remote items (mostly content from the relay) will be deleted. Default value is 90 days. Defaults to the general lifespan value of remote items if set to 0.")],
-               '$dbclean_expire_conv'  => ['dbclean_expire_conv', L10n::t("Lifespan of raw conversation data"), Config::get('system','dbclean_expire_conversation', 90), L10n::t("The conversation data is used for ActivityPub and OStatus, as well as for debug purposes. It should be save to remove it after 14 days, default is 90 days.")],
+               '$dbclean_expire_conv'  => ['dbclean_expire_conv', L10n::t("Lifespan of raw conversation data"), Config::get('system','dbclean_expire_conversation', 90), L10n::t("The conversation data is used for ActivityPub and OStatus, as well as for debug purposes. It should be safe to remove it after 14 days, default is 90 days.")],
                '$itemcache'            => ['itemcache', L10n::t("Path to item cache"), Config::get('system','itemcache'), L10n::t("The item caches buffers generated bbcode and external images.")],
                '$itemcache_duration'   => ['itemcache_duration', L10n::t("Cache duration in seconds"), Config::get('system','itemcache_duration'), L10n::t("How long should the cache files be hold? Default value is 86400 seconds \x28One day\x29. To disable the item cache, set the value to -1.")],
                '$max_comments'         => ['max_comments', L10n::t("Maximum numbers of comments per post"), Config::get('system','max_comments'), L10n::t("How much comments should be shown for each post? Default value is 100.")],