Skip to content
Snippets Groups Projects
Commit 7684585f authored by Robin Appelman's avatar Robin Appelman
Browse files

404 error page

parent 5896fbd9
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
img/weather-clear.png

21.4 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();
}
?>
\ No newline at end of file
<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>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment