mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Add self test check: "Mobile App - Push Service" (#6628)
* Add self test check: "Mobile App - Push Service" * Fix wording
This commit is contained in:
parent
502b17791e
commit
7d19bf7a45
@ -7,6 +7,7 @@ HumHub Changelog
|
||||
- Enh #6620: Marketplace: Add more module checks
|
||||
- Enh #6621: Avoid PHP error when trying to download a file without guid in the URL params (return 404 exception instead)
|
||||
- Enh #6623: Add a hint in the "Dropdown space order" settings to inform that a manual sort is always applied first
|
||||
- Enh #6628: Add self test check: "Mobile App - Push Service"
|
||||
|
||||
1.15.0-beta.2 (October 5, 2023)
|
||||
-------------------------------
|
||||
|
@ -316,22 +316,6 @@ class SelfTest
|
||||
];
|
||||
}
|
||||
|
||||
// Checks GraphicsMagick Extension
|
||||
$title = 'PHP - ' . Yii::t('AdminModule.information', '{phpExtension} Extension', ['phpExtension' => 'GraphicsMagick']);
|
||||
if (class_exists('Gmagick', false)) {
|
||||
$checks[] = [
|
||||
'title' => $title,
|
||||
'state' => 'OK'
|
||||
];
|
||||
} else {
|
||||
$checks[] = [
|
||||
'title' => $title,
|
||||
'state' => 'WARNING',
|
||||
'hint' => Yii::t('AdminModule.information', 'Optional')
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
$memoryLimit = ini_get('memory_limit');
|
||||
if (preg_match('/^(\d+)(.)$/', $memoryLimit, $m)) {
|
||||
if ($m[2] == 'G') {
|
||||
@ -393,22 +377,6 @@ class SelfTest
|
||||
];
|
||||
}
|
||||
|
||||
// Checks SQLite3 Extension
|
||||
$title = 'PHP - ' . Yii::t('AdminModule.information', '{phpExtension} Support', ['phpExtension' => 'SQLite3']);
|
||||
if (class_exists('SQLite3')) {
|
||||
$checks[] = [
|
||||
'title' => $title,
|
||||
'state' => 'OK'
|
||||
];
|
||||
} else {
|
||||
$checks[] = [
|
||||
'title' => $title,
|
||||
'state' => 'WARNING',
|
||||
'hint' => Yii::t('AdminModule.information', 'Optional') . ' - '
|
||||
. Yii::t('AdminModule.information', 'Install {phpExtension} Extension for DB Caching', ['phpExtension' => 'SQLite3'])
|
||||
];
|
||||
}
|
||||
|
||||
// Checks PDO MySQL Extension
|
||||
$title = 'PHP - ' . Yii::t('AdminModule.information', '{phpExtension} Extension', ['phpExtension' => 'PDO MySQL']);
|
||||
if (extension_loaded('pdo_mysql')) {
|
||||
@ -876,6 +844,25 @@ class SelfTest
|
||||
];
|
||||
}
|
||||
|
||||
// Check Mobile App - Push Service
|
||||
$title = $titlePrefix . Yii::t('AdminModule.information', 'Mobile App - Push Service');
|
||||
/* @var \humhub\modules\fcmPush\Module|null $pushModule */
|
||||
$pushModule = $modules['fcm-push'] ?? null;
|
||||
if ($pushModule instanceof \humhub\modules\fcmPush\Module &&
|
||||
$pushModule->isActivated &&
|
||||
$pushModule->getGoService()->isConfigured()) {
|
||||
$checks[] = [
|
||||
'title' => $title,
|
||||
'state' => 'OK'
|
||||
];
|
||||
} else {
|
||||
$checks[] = [
|
||||
'title' => $title,
|
||||
'state' => 'WARNING',
|
||||
'hint' => Yii::t('AdminModule.information', '"Push Notifications (Firebase)" module and setup of Firebase API Key required')
|
||||
];
|
||||
}
|
||||
|
||||
return $checks;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user