]> git.mxchange.org Git - friendica.git/commitdiff
Get PHP Configuration for upload limit and display in /admin summary site
authorJonny Tischbein <jonny_tischbein@systemli.org>
Thu, 27 Sep 2018 16:53:16 +0000 (18:53 +0200)
committerJonny Tischbein <jonny_tischbein@systemli.org>
Thu, 27 Sep 2018 16:53:16 +0000 (18:53 +0200)
mod/admin.php
view/theme/frio/templates/admin/summary.tpl

index d4fcc533f73f60d1a79c0c4cff6be9b9eac9f744..0cb30924a8eb96802c00340b44ce356c95cc47c2 100644 (file)
@@ -908,6 +908,7 @@ 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')]];
 
        $t = get_markup_template('admin/summary.tpl');
        return replace_macros($t, [
@@ -923,6 +924,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,
                '$showwarning' => $showwarning,
                '$warningtext' => $warningtext
        ]);
index 30eca8dc0f52e84f2d16436e02368ca26ff6bd7a..6cdcb65929694d1bfe480d93cbe917ae3ab65ede 100644 (file)
                        <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 admin-summary-label-name text-muted">{{$version.0}}</div>
                        <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. *}}
+               <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-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><td>{{$k}}</td><td>{{$p}}</td></tr>
+                       {{/foreach}}
+                       </tbody>
+                </table>
+                       </div>
+               </div>
+
        </div>
 
        <div class="clear"></div>