404 error page

remotes/origin/stable
Robin Appelman 14 years ago
parent 5896fbd910
commit 7684585f49
  1. 8
      files/download.php
  2. BIN
      img/weather-clear.png
  3. 5
      lib/files.php
  4. 3
      plugins/publiclink/get.php
  5. 9
      templates/404.php

@ -33,6 +33,14 @@ if( !OC_USER::isLoggedIn()){
$filename = $_GET["file"];
if(!OC_FILESYSTEM::file_exists($filename)){
header("HTTP/1.0 404 Not Found");
$tmpl = new OC_TEMPLATE( '', '404', 'guest' );
$tmpl->assign('file',$filename);
$tmpl->printPage();
exit;
}
$ftype=OC_FILESYSTEM::getMimeType( $filename );
header('Content-Type:'.$ftype);

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

@ -146,7 +146,10 @@ class OC_FILES {
}
}elseif($zip or !OC_FILESYSTEM::file_exists($filename)){
header("HTTP/1.0 404 Not Found");
die('404 Not Found');
$tmpl = new OC_TEMPLATE( '', '404', 'guest' );
$tmpl->assign('file',$filename);
$tmpl->printPage();
// die('404 Not Found');
}else{
header("HTTP/1.0 403 Forbidden");
die('403 Forbidden');

@ -70,7 +70,8 @@ if($path!==false){
}
}else{
header("HTTP/1.0 404 Not Found");
echo '404 Not Found';
$tmpl = new OC_TEMPLATE( '', '404', 'guest' );
$tmpl->printPage();
die();
}
?>

@ -0,0 +1,9 @@
<div id="login">
<img src="<?php echo image_path("", "weather-clear.png"); ?>" alt="ownCloud" />
<ul>
<li class='error'>
Error 404, Cloud not found<br/>
<p class='hint'><?php if(isset($_['file'])) echo $_['file']?></p>
</li>
</ul>
</div>
Loading…
Cancel
Save