mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
improve request stats
This commit is contained in:
parent
61eb86ae6f
commit
0844846f51
|
|
@ -165,7 +165,7 @@ final class HttpHeader extends HeaderAbstract
|
|||
|
||||
if (\strpos($userAgent, 'Opera') !== false || \strpos($userAgent, 'OPR/') !== false) {
|
||||
return 'Opera';
|
||||
} elseif (\strpos($userAgent, 'Edge') !== false) {
|
||||
} elseif (\strpos($userAgent, 'Edge') !== false || \strpos($userAgent, 'Edg/') !== false) {
|
||||
return 'Microsoft Edge';
|
||||
} elseif (\strpos($userAgent, 'Chrome') !== false) {
|
||||
return 'Google Chrome';
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ class ImpressionStat
|
|||
|
||||
public string $userAgent = '';
|
||||
|
||||
public array $meta = [];
|
||||
|
||||
public function __construct(HttpRequest $request)
|
||||
{
|
||||
$this->language = $request->header->l11n->language;
|
||||
|
|
@ -73,6 +75,7 @@ class ImpressionStat
|
|||
'country' => $this->country,
|
||||
'referer' => $this->referer,
|
||||
'datetime' => $this->datetime->getTimestamp(),
|
||||
'meta' => $this->meta,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user