Updates and fixes

This commit is contained in:
Matteo Gheza 2021-03-01 22:39:49 +01:00
parent f5993936c3
commit 0389e77c81
3 changed files with 16 additions and 9 deletions

View File

@ -46,6 +46,7 @@ $baseConfig = [
vendor/tracy/tracy/tools
vendor
*.lock
*.zip
',
'before' => [
'local: cd server && composer update --no-dev -o'

10
server/composer.lock generated
View File

@ -393,16 +393,16 @@
},
{
"name": "giggsey/libphonenumber-for-php",
"version": "8.12.18",
"version": "8.12.19",
"source": {
"type": "git",
"url": "https://github.com/giggsey/libphonenumber-for-php.git",
"reference": "2d50e0aea1f70508b39a3d22c62d24d66d532ed2"
"reference": "f3c196dcb3e76e456783a38bab87d99b4d727918"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/2d50e0aea1f70508b39a3d22c62d24d66d532ed2",
"reference": "2d50e0aea1f70508b39a3d22c62d24d66d532ed2",
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/f3c196dcb3e76e456783a38bab87d99b4d727918",
"reference": "f3c196dcb3e76e456783a38bab87d99b4d727918",
"shasum": ""
},
"require": {
@ -462,7 +462,7 @@
"issues": "https://github.com/giggsey/libphonenumber-for-php/issues",
"source": "https://github.com/giggsey/libphonenumber-for-php"
},
"time": "2021-02-08T10:31:32+00:00"
"time": "2021-03-01T16:07:56+00:00"
},
{
"name": "giggsey/locale",

View File

@ -782,10 +782,16 @@ function init_class($enableDebugger=true, $headers=true)
if(SENTRY_ENABLED){
Sentry\configureScope(function (Sentry\State\Scope $scope): void {
global $user, $translations;
$scope->setUser([
'id' => $user->auth->getUserId(),
'username' => $user->nameById($user->auth->getUserId())
]);
if($user->authenticated()){
$id = $user->auth->getUserId();
$username = $user->nameById($id);
if($username !== false){
$scope->setUser([
'id' => $id,
'username' => $username
]);
}
}
$scope->setTag('page.locale', $translations->client_languages[0]);
});
//If Sentry is enabled -> no Tracy bluescreen -> custom tmp bluescreen function