mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
More postgres fixes
This commit is contained in:
parent
3ac9a05632
commit
e3760749ae
4 changed files with 25 additions and 5 deletions
|
@ -105,10 +105,31 @@ trait AdminSettingsController
|
|||
{
|
||||
$sys = [
|
||||
'pixelfed' => config('pixelfed.version'),
|
||||
'mysql' => DB::select( DB::raw("select version()") )[0]->{'version()'},
|
||||
'php' => phpversion(),
|
||||
'redis' => explode(' ',exec('redis-cli -v'))[1],
|
||||
];
|
||||
switch (config('database.default')) {
|
||||
case 'pgsql':
|
||||
$sys['database'] = [
|
||||
'name' => 'Postgres',
|
||||
'version' => explode(' ', DB::select(DB::raw('select version();'))[0]->version)[1]
|
||||
];
|
||||
break;
|
||||
|
||||
case 'mysql':
|
||||
$sys['database'] = [
|
||||
'name' => 'MySQL',
|
||||
'version' => DB::select( DB::raw("select version()") )[0]->{'version()'}
|
||||
];
|
||||
break;
|
||||
|
||||
default:
|
||||
$sys['database'] = [
|
||||
'name' => 'Unknown',
|
||||
'version' => '?'
|
||||
];
|
||||
break;
|
||||
}
|
||||
return view('admin.settings.system', compact('sys'));
|
||||
}
|
||||
}
|
|
@ -78,7 +78,6 @@ class InternalApiController extends Controller
|
|||
}
|
||||
|
||||
$status->caption = strip_tags($request->caption);
|
||||
$status->visibility = 'draft';
|
||||
$status->scope = 'draft';
|
||||
$status->profile_id = $profile->id;
|
||||
$status->save();
|
||||
|
|
|
@ -68,7 +68,7 @@ class ProfileController extends Controller
|
|||
}
|
||||
$is_admin = is_null($user->domain) ? $user->user->is_admin : false;
|
||||
$profile = $user;
|
||||
return view('profile.show', compact('user', 'profile', 'settings', 'owner', 'is_following', 'is_admin', 'timeline'));
|
||||
return view('profile.show', compact('user', 'profile', 'settings', 'owner', 'is_following', 'is_admin'));
|
||||
}
|
||||
|
||||
public function permalinkRedirect(Request $request, $username)
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
<div class="col-12 col-md-3">
|
||||
<div class="card mb-3 border-left-blue">
|
||||
<div class="card-body text-center">
|
||||
<p class="font-weight-ultralight h2 mb-0 text-truncate">{{$sys['mysql']}}</p>
|
||||
<p class="font-weight-ultralight h2 mb-0 text-truncate">{{$sys['database']['version']}}</p>
|
||||
</div>
|
||||
<div class="card-footer font-weight-bold py-0 text-center bg-white">MySQL</div>
|
||||
<div class="card-footer font-weight-bold py-0 text-center bg-white">{{$sys['database']['name']}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-3">
|
||||
|
|
Loading…
Reference in a new issue