aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-01-03 10:59:38 +0000
committerMario <mario@mariovavti.com>2023-01-03 10:59:38 +0000
commitda9349ea621fbb506b0e1d78a8bf0a8f3958b48e (patch)
treec171060de20eee687dcb36c4c2be4cb0ed1f2395
parentde0d2afc154196ed80960435ac9c74ce37635576 (diff)
downloadvolse-hubzilla-da9349ea621fbb506b0e1d78a8bf0a8f3958b48e.tar.gz
volse-hubzilla-da9349ea621fbb506b0e1d78a8bf0a8f3958b48e.tar.bz2
volse-hubzilla-da9349ea621fbb506b0e1d78a8bf0a8f3958b48e.zip
provide inline error messages for mod cloud
-rw-r--r--Zotlabs/Module/Cloud.php11
-rw-r--r--view/js/mod_cloud.js3
2 files changed, 7 insertions, 7 deletions
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'] = '<h2>404 Not found</h2>';
}
elseif($err instanceof \Sabre\DAV\Exception\Forbidden) {
- notice( t('Permission denied') . EOL);
+ \App::$page['content'] = '<h2>403 Forbidden</h2>';
}
elseif($err instanceof \Sabre\DAV\Exception\NotImplemented) {
- // notice( t('Please refresh page') . EOL);
- goaway(z_root() . '/' . \App::$query_string);
+ \App::$page['content'] = '<h2>501 Not implemented</h2>';
}
else {
- notice( t('Unknown error') . EOL);
+ \App::$page['content'] = '<h2>500 Unknown error</h2>';
}
construct_page();
-
killme();
}
diff --git a/view/js/mod_cloud.js b/view/js/mod_cloud.js
index 7f9cb4fd1..e0f59beab 100644
--- a/view/js/mod_cloud.js
+++ b/view/js/mod_cloud.js
@@ -411,6 +411,9 @@ function UploadInit() {
var filedrag = $(".cloud-index.attach-drop");
var reload = false;
+ if (!$('#invisible-cloud-file-upload').length)
+ return;
+
$('#invisible-cloud-file-upload').fileupload({
url: 'file_upload',
dataType: 'json',