Merge pull request #5796 from JonnyTischbein/issue_5547
[frio] Get PHP Configuration for upload limit and display in /admin summary site
This commit is contained in:
commit
e287991819
|
@ -909,6 +909,15 @@ function admin_page_summary(App $a)
|
|||
$queues = ['label' => L10n::t('Message queues'), 'queue' => $queue, 'workerq' => $workerqueue];
|
||||
|
||||
|
||||
$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, [
|
||||
'$title' => L10n::t('Administration'),
|
||||
|
@ -923,6 +932,7 @@ function admin_page_summary(App $a)
|
|||
'$codename' => FRIENDICA_CODENAME,
|
||||
'$build' => Config::get('system', 'build'),
|
||||
'$addons' => [L10n::t('Active addons'), $a->addons],
|
||||
'$serversettings' => $server_settings,
|
||||
'$showwarning' => $showwarning,
|
||||
'$warningtext' => $warningtext
|
||||
]);
|
||||
|
|
|
@ -44,5 +44,22 @@
|
|||
<dd> {{$platform}} '{{$codename}}' {{$version.1}} - {{$build}}</dt>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt>{{$serversettings.label}}</dt>
|
||||
<dd>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><td colspan="2"><b>PHP</b></td></tr>
|
||||
{{foreach $serversettings.php as $k => $p}}
|
||||
<tr><td>{{$k}}</td><td>{{$p}}</td></tr>
|
||||
{{/foreach}}
|
||||
<tr><td colspan="2"><b>MySQL / MariaDB</b></td></tr>
|
||||
{{foreach $serversettings.mysql as $k => $p}}
|
||||
<tr><td>{{$k}}</td><td>{{$p}}</td></tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -57,6 +57,27 @@
|
|||
<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>
|
||||
|
||||
{{* 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">{{$serversettings.label}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 admin-summary-entry">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<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>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
|
Loading…
Reference in a new issue