From da9349ea621fbb506b0e1d78a8bf0a8f3958b48e Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 3 Jan 2023 10:59:38 +0000 Subject: provide inline error messages for mod cloud --- Zotlabs/Module/Cloud.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'Zotlabs/Module/Cloud.php') diff --git a/Zotlabs/Module/Cloud.php b/Zotlabs/Module/Cloud.php index 4cc7595a1..d82e0bd47 100644 --- a/Zotlabs/Module/Cloud.php +++ b/Zotlabs/Module/Cloud.php @@ -100,7 +100,6 @@ class Cloud extends Controller { // over-ride the default XML output on thrown exceptions - $server->on('exception', [ $this, 'DAVException' ]); // All we need to do now, is to fire up the server @@ -117,21 +116,19 @@ class Cloud extends Controller { function DAVException($err) { if($err instanceof \Sabre\DAV\Exception\NotFound) { - notice( t('Not found') . EOL); + \App::$page['content'] = '

404 Not found

'; } elseif($err instanceof \Sabre\DAV\Exception\Forbidden) { - notice( t('Permission denied') . EOL); + \App::$page['content'] = '

403 Forbidden

'; } elseif($err instanceof \Sabre\DAV\Exception\NotImplemented) { - // notice( t('Please refresh page') . EOL); - goaway(z_root() . '/' . \App::$query_string); + \App::$page['content'] = '

501 Not implemented

'; } else { - notice( t('Unknown error') . EOL); + \App::$page['content'] = '

500 Unknown error

'; } construct_page(); - killme(); } -- cgit v1.2.3