mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Added phpinfo page if debugging is enabled
This commit is contained in:
parent
ab2b2f3043
commit
c2927c4a2e
|
@ -687,6 +687,18 @@ class SettingsController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a form to allow a super admin to update settings.
|
||||||
|
*
|
||||||
|
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||||
|
* @since [v4.0]
|
||||||
|
* @return View
|
||||||
|
*/
|
||||||
|
public function getPhpInfo()
|
||||||
|
{
|
||||||
|
return view('settings.phpinfo');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a form to allow a super admin to update settings.
|
* Return a form to allow a super admin to update settings.
|
||||||
|
|
|
@ -163,7 +163,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if (config('app.debug')=== true)
|
||||||
|
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||||
|
<div class="box box-default">
|
||||||
|
<div class="box-body text-center">
|
||||||
|
<a href="{{ route('settings.phpinfo.index') }}" class="btn btn-lg btn-white"><i class="fa fa-server fa-3x"></i></a>
|
||||||
|
<br>
|
||||||
|
PHP
|
||||||
|
<p class="help-block">PHP System Info</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
<div class="col-md-4 col-lg-3 col-sm-6 col-xl-1">
|
||||||
<div class="box box-danger">
|
<div class="box box-danger">
|
||||||
|
@ -176,12 +187,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -229,6 +234,7 @@
|
||||||
</div><!--/row-->
|
</div><!--/row-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@stop
|
@stop
|
||||||
|
|
||||||
|
|
||||||
|
|
31
resources/views/settings/phpinfo.blade.php
Normal file
31
resources/views/settings/phpinfo.blade.php
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
@extends('layouts/default')
|
||||||
|
|
||||||
|
{{-- Page title --}}
|
||||||
|
@section('title')
|
||||||
|
PHP Info
|
||||||
|
@parent
|
||||||
|
@stop
|
||||||
|
|
||||||
|
@section('header_right')
|
||||||
|
<a href="{{ route('settings.index') }}" class="btn btn-default"> {{ trans('general.back') }}</a>
|
||||||
|
@stop
|
||||||
|
|
||||||
|
|
||||||
|
{{-- Page content --}}
|
||||||
|
@section('content')
|
||||||
|
@if (config('app.debug')=== true)
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<?php phpinfo(); ?>
|
||||||
|
</div> <!-- /.col-md-12-->
|
||||||
|
</div> <!-- /.row-->
|
||||||
|
|
||||||
|
@else
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
This information is only available when debug is enabled.
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
|
||||||
|
@stop
|
|
@ -140,6 +140,7 @@ Route::group([ 'prefix' => 'admin','middleware' => ['authorize:superuser']], fun
|
||||||
Route::get('ldap', ['as' => 'settings.ldap.index','uses' => 'SettingsController@getLdapSettings' ]);
|
Route::get('ldap', ['as' => 'settings.ldap.index','uses' => 'SettingsController@getLdapSettings' ]);
|
||||||
Route::post('ldap', ['as' => 'settings.ldap.save','uses' => 'SettingsController@postLdapSettings' ]);
|
Route::post('ldap', ['as' => 'settings.ldap.save','uses' => 'SettingsController@postLdapSettings' ]);
|
||||||
|
|
||||||
|
Route::get('phpinfo', ['as' => 'settings.phpinfo.index','uses' => 'SettingsController@getPhpInfo' ]);
|
||||||
|
|
||||||
|
|
||||||
Route::get('oauth', [ 'as' => 'settings.oauth.index', 'uses' => 'SettingsController@api' ]);
|
Route::get('oauth', [ 'as' => 'settings.oauth.index', 'uses' => 'SettingsController@api' ]);
|
||||||
|
|
Loading…
Reference in a new issue