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:
Marc Farré 2024-12-12 14:28:11 +00:00 committed by GitHub
parent 81ffdea9d4
commit 516b839640
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -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)
---------------------------------

View File

@ -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');