]> git.mxchange.org Git - friendica.git/commitdiff
associative array + adding mysql value + removing table header
authorJonny Tischbein <jonny_tischbein@systemli.org>
Thu, 27 Sep 2018 17:46:28 +0000 (19:46 +0200)
committerJonny Tischbein <jonny_tischbein@systemli.org>
Thu, 27 Sep 2018 17:46:28 +0000 (19:46 +0200)
mod/admin.php
view/theme/frio/templates/admin/summary.tpl

index 0cb30924a8eb96802c00340b44ce356c95cc47c2..562845ecc80b69851f9c70ff52d6fccea4f1ed69 100644 (file)
@@ -908,7 +908,15 @@ function admin_page_summary(App $a)
 
        $queues = ['label' => L10n::t('Message queues'), 'queue' => $queue, 'workerq' => $workerqueue];
 
-       $php_settings = [L10n::t('PHP Values'), ['upload_max_filesize' => ini_get('upload_max_filesize'), 'post_max_size' => ini_get('post_max_size'), 'memory_limit' => ini_get('memory_limit')]];
+
+       $r = q("SHOW variables LIKE 'max_allowed_packet'");
+       $max_allowed_packet = (($r) ? $r[0]['Value'] : 0);
+
+       $server_settings = ['label' => L10n::t('Server Settings'), 
+                               'php' => ['upload_max_filesize' => ini_get('upload_max_filesize'), 
+                                                 'post_max_size' => ini_get('post_max_size'), 
+                                                 'memory_limit' => ini_get('memory_limit')], 
+                               'mysql' => ['max_allowed_packet' => $max_allowed_packet]];
 
        $t = get_markup_template('admin/summary.tpl');
        return replace_macros($t, [
@@ -924,7 +932,7 @@ function admin_page_summary(App $a)
                '$codename' => FRIENDICA_CODENAME,
                '$build' => Config::get('system', 'build'),
                '$addons' => [L10n::t('Active addons'), $a->addons],
-               '$php' => $php_settings,
+               '$serversettings' => $server_settings,
                '$showwarning' => $showwarning,
                '$warningtext' => $warningtext
        ]);
index ff70a0c7cb5ad5bb77ee8850b31a62a723780898..3c33f92fdbe5dd03cc398861807e1e13144715e5 100644 (file)
                        <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 admin-summary-entry">{{$platform}} '{{$codename}}' {{$version.1}} - {{$build}}</div>
                </div>
 
-               {{* PHP Values. *}}
+               {{* Server Settings. *}}
                <div id="admin-summary-php" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 admin-summary">
                        <hr class="admin-summary-separator">
-                       <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 admin-summary-label-name text-muted">{{$php.0}}</div>
+                       <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 admin-summary-label-name text-muted">{{$serversettings.label}}</div>
                        <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 admin-summary-entry">
                                <table class="table">
-                               <thead><tr><td>Configuration</td><td>Value</td></tr></thead>
                                <tbody>
-                                       {{foreach $php.1 as $k => $p}}
+                                       <tr class="info"><td colspan="2">PHP</td></tr>
+                                       {{foreach $serversettings.php as $k => $p}}
+                                               <tr><td>{{$k}}</td><td>{{$p}}</td></tr>
+                                       {{/foreach}}
+                                       <tr class="info"><td colspan="2">MySQL / MariaDB</td></tr>
+                                       {{foreach $serversettings.mysql as $k => $p}}
                                                <tr><td>{{$k}}</td><td>{{$p}}</td></tr>
                                        {{/foreach}}
                                </tbody>