Page MenuHomePhorge

D5343.1775959594.diff
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

D5343.1775959594.diff

diff --git a/src/app/Backends/DAV.php b/src/app/Backends/DAV.php
--- a/src/app/Backends/DAV.php
+++ b/src/app/Backends/DAV.php
@@ -184,11 +184,10 @@
*
* @return bool True on success, False otherwise
*/
- public static function healthcheck(): bool
+ public static function healthcheck($username, $password): bool
{
- $dav = new self();
- $dav->setUrl(\config('services.dav.uri'));
- return $dav->options() != false;
+ $homes = self::getInstance($username, $password)->discover();
+ return !empty($homes);
}
/**
diff --git a/src/app/Console/Commands/Status/Health.php b/src/app/Console/Commands/Status/Health.php
--- a/src/app/Console/Commands/Status/Health.php
+++ b/src/app/Console/Commands/Status/Health.php
@@ -73,7 +73,7 @@
private function checkDAV()
{
try {
- return DAV::healthcheck();
+ return DAV::healthcheck($this->option('user'), $this->option('password'));
} catch (\Exception $exception) {
$this->line($exception);
return false;
@@ -196,10 +196,11 @@
$steps = $this->option('check');
if (empty($steps)) {
$steps = [
- 'DB', 'Redis', 'Roundcube', 'Meet', 'DAV', 'Mollie', 'OpenExchangeRates',
+ 'DB', 'Redis', 'Roundcube', 'Meet',
];
if (!empty($this->option('user'))) {
array_unshift($steps, 'Auth');
+ array_unshift($steps, 'DAV');
array_unshift($steps, 'SMTP');
}
if (\config('app.with_ldap')) {
@@ -211,6 +212,12 @@
if (\config('app.with_files')) {
array_unshift($steps, 'Storage');
}
+ if (\config('services.mollie.key')) {
+ array_unshift($steps, 'Mollie');
+ }
+ if (\config('services.openexchangerates.api_key')) {
+ array_unshift($steps, 'OpenExchangeRates');
+ }
}
foreach ($steps as $step) {

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 12, 2:06 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18834103
Default Alt Text
D5343.1775959594.diff (2 KB)

Event Timeline