$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);
}
}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');
}
}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
--- /dev/null
+<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