diff --git a/apps/files_sharing/css/404.css b/apps/files_sharing/css/404.css new file mode 100644 index 0000000000..2ed81df3b8 --- /dev/null +++ b/apps/files_sharing/css/404.css @@ -0,0 +1,12 @@ + +#body-login .error-broken-link{ + text-align:left;color:#fff; +} + +#body-login .error-broken-link ul{ + margin:10px 0 10px 0; +} + +#body-login .error-broken-link ul li{ + list-style: disc;list-style-position:inside;cursor:default; +} diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 3f8e29345a..741ab14538 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -234,6 +234,12 @@ 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'); +OCP\Util::addStyle('files_sharing', '404'); $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 0000000000..b5152e1511 --- /dev/null +++ b/apps/files_sharing/templates/part.404.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/core/templates/404.php b/core/templates/404.php index ee17f0de8e..bf1e03e6bc 100644 --- a/core/templates/404.php +++ b/core/templates/404.php @@ -7,9 +7,13 @@ if(!isset($_)) {//also provide standalone error page exit; } ?> - + + + + +