mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Add DeviceDetectorHelper::isMultiInstanceApp() method to detect if th… (#7339)
* Add DeviceDetectorHelper::isMultiInstanceApp() method to detect if the app is running in a multi-instance mode * Add PR ID to CHANGELOG
This commit is contained in:
parent
81ffdea9d4
commit
516b839640
@ -16,6 +16,7 @@ HumHub Changelog
|
||||
- Enh #7333: Improved Yii alias handling and added ENV support
|
||||
- Enh #7334: New safe method to rename a database column
|
||||
- Enh #7336: Update GitHub workflow versions
|
||||
- Enh #7339: Add `DeviceDetectorHelper::isMultiInstanceApp()` method to detect if the app is running in a multi-instance mode
|
||||
|
||||
1.17.0-beta.2 (November 12, 2024)
|
||||
---------------------------------
|
||||
|
@ -52,6 +52,13 @@ class DeviceDetectorHelper
|
||||
&& Yii::$app->request->headers->get('x-humhub-app-is-android');
|
||||
}
|
||||
|
||||
public static function isMultiInstanceApp(): bool
|
||||
{
|
||||
return
|
||||
static::isAppRequest()
|
||||
&& Yii::$app->request->headers->get('x-humhub-app-is-multi-instance');
|
||||
}
|
||||
|
||||
public static function isMicrosoftOffice(): bool
|
||||
{
|
||||
return str_contains((string)Yii::$app->request->getUserAgent(), 'Microsoft Office');
|
||||
|
Loading…
x
Reference in New Issue
Block a user