Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F118934702
D5343.1776074126.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D5343.1776074126.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 13, 9:55 AM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18834103
Default Alt Text
D5343.1776074126.diff (2 KB)
Attached To
Mode
D5343: Turn the DAV healthcheck into something that actually detects a dav server
Attached
Detach File
Event Timeline