]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make 404 page easier to understand
authorLukas Reschke <lukas@owncloud.com>
Wed, 17 Sep 2014 20:49:37 +0000 (22:49 +0200)
committerLukas Reschke <lukas@owncloud.com>
Wed, 17 Sep 2014 20:57:32 +0000 (22:57 +0200)
Fixes https://github.com/owncloud/core/issues/11133

core/templates/404.php
lib/private/files.php

index bf1e03e6bc9852acb23bda8f7824c66a891efeb5..90912844ef9f3db7915e6ac288f98795e15dc2fc 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+/** @var $_ array */
+/** @var $l OC_L10N */
 if(!isset($_)) {//also provide standalone error page
        require_once '../../lib/base.php';
        
@@ -12,8 +14,9 @@ if(!isset($_)) {//also provide standalone error page
 <?php else: ?>
        <ul>
                <li class="error">
-                       <?php p($l->t( 'Cloud not found' )); ?><br/>
-                       <p class='hint'><?php if(isset($_['file'])) p($_['file'])?></p>
+                       <?php p($l->t('File not found')); ?><br/>
+                       <p class="hint"><?php p($l->t('The specified document has not been found on the server.')); ?></p>
+                       <p class="hint"><a href="<?php p(OC_Helper::linkTo('', 'index.php')) ?>"><?php p($l->t('You can click here to return to %s.', array($theme->getName()))); ?></a></p>
                </li>
        </ul>
 <?php endif; ?>
index 06fc2dc910917d0210bdd86c11944d74eb289cad..a983f6f32f57a99457f91ae01d91f23903d94411 100644 (file)
@@ -116,7 +116,6 @@ class OC_Files {
                } elseif (!\OC\Files\Filesystem::file_exists($filename)) {
                        header("HTTP/1.0 404 Not Found");
                        $tmpl = new OC_Template('', '404', 'guest');
-                       $tmpl->assign('file', $name);
                        $tmpl->printPage();
                } else {
                        header("HTTP/1.0 403 Forbidden");