make error 404 template usable as stand alone php file
This commit is contained in:
parent
46f1ea14c0
commit
1c300bb49b
|
@ -19,6 +19,13 @@ if($path!==false){
|
||||||
$subPath='';
|
$subPath='';
|
||||||
}
|
}
|
||||||
$path.=$subPath;
|
$path.=$subPath;
|
||||||
|
if(!OC_FILESYSTEM::file_exists($path)){
|
||||||
|
header("HTTP/1.0 404 Not Found");
|
||||||
|
$tmpl = new OC_TEMPLATE( '', '404', 'guest' );
|
||||||
|
$tmpl->assign('file',$subPath);
|
||||||
|
$tmpl->printPage();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
if(OC_FILESYSTEM::is_dir($path)){
|
if(OC_FILESYSTEM::is_dir($path)){
|
||||||
$files = array();
|
$files = array();
|
||||||
$rootLength=strlen($root);
|
$rootLength=strlen($root);
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
<?php
|
||||||
|
if(!isset($_)){//also provide standalone error page
|
||||||
|
require_once '../lib/base.php';
|
||||||
|
require( 'template.php' );
|
||||||
|
|
||||||
|
$tmpl = new OC_TEMPLATE( '', '404', 'guest' );
|
||||||
|
$tmpl->printPage();
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
?>
|
||||||
<div id="login">
|
<div id="login">
|
||||||
<img src="<?php echo image_path("", "weather-clear.png"); ?>" alt="ownCloud" />
|
<img src="<?php echo image_path("", "weather-clear.png"); ?>" alt="ownCloud" />
|
||||||
<ul>
|
<ul>
|
||||||
|
|
Loading…
Reference in New Issue