diff --git a/CHANGELOG-DEV.md b/CHANGELOG-DEV.md index 244d016103..21e9ee131d 100644 --- a/CHANGELOG-DEV.md +++ b/CHANGELOG-DEV.md @@ -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) ------------------------------- diff --git a/protected/humhub/libs/SelfTest.php b/protected/humhub/libs/SelfTest.php index 54485d7d0e..eb5306f8da 100644 --- a/protected/humhub/libs/SelfTest.php +++ b/protected/humhub/libs/SelfTest.php @@ -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; } }