aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-07-29 16:33:23 +0300
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>2013-07-29 16:54:19 +0300
commit97f2c393c122409f1c90234935a8ebbca962cb44 (patch)
tree3571288ff0c282ab93d7e1f1721436d9885183a0 /apps
parent954b5d9019263b8d11cd61c858942f9eee78421d (diff)
downloadnextcloud-server-97f2c393c122409f1c90234935a8ebbca962cb44.tar.gz
nextcloud-server-97f2c393c122409f1c90234935a8ebbca962cb44.zip
Allow apps to have own 404 content, closes #3225
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/public.php5
-rw-r--r--apps/files_sharing/templates/part.404.php12
2 files changed, 17 insertions, 0 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 3f8e29345a7..6878109f7b9 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -234,6 +234,11 @@ if (isset($path)) {
} else {
OCP\Util::writeLog('share', 'could not resolve linkItem', \OCP\Util::DEBUG);
}
+
+$errorTemplate = new OCP\Template('files_sharing', 'part.404', '');
+$errorContent = $errorTemplate->fetchPage();
+
header('HTTP/1.0 404 Not Found');
$tmpl = new OCP\Template('', '404', 'guest');
+$tmpl->assign('content', $errorContent);
$tmpl->printPage();
diff --git a/apps/files_sharing/templates/part.404.php b/apps/files_sharing/templates/part.404.php
new file mode 100644
index 00000000000..400dd6bbfd6
--- /dev/null
+++ b/apps/files_sharing/templates/part.404.php
@@ -0,0 +1,12 @@
+<ul>
+ <li class="error error-broken-link">
+ <p><?php p($l->t('Sorry, this link doesn’t seem to work anymore.')) ?></p>
+ <p><?php p($l->t('Reasons might be:')); ?></p>
+ <ul>
+ <li><?php p($l->t('the item was removed')); ?></li>
+ <li><?php p($l->t('the link expired')); ?></li>
+ <li><?php p($l->t('sharing is disabled for this ownCloud')); ?></li>
+ </ul>
+ <p><?php p($l->t('For more info, please ask the person who sent this link.')); ?></p>
+ </li>
+</ul> \ No newline at end of file