diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-04-18 14:04:55 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-04-18 14:10:58 +0200 |
commit | 1c300bb49b1139f25bd0b66f2a2cd36c49c013b5 (patch) | |
tree | c4f7a5fefa6aba4593ec745fa19ec753ca0ee563 /plugins | |
parent | 46f1ea14c0af9f64722d44d9390d868c4e060c14 (diff) | |
download | nextcloud-server-1c300bb49b1139f25bd0b66f2a2cd36c49c013b5.tar.gz nextcloud-server-1c300bb49b1139f25bd0b66f2a2cd36c49c013b5.zip |
make error 404 template usable as stand alone php file
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/publiclink/get.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/publiclink/get.php b/plugins/publiclink/get.php index fb8a13b5417..41b10484f9b 100644 --- a/plugins/publiclink/get.php +++ b/plugins/publiclink/get.php @@ -19,6 +19,13 @@ if($path!==false){ $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)){ $files = array(); $rootLength=strlen($root); |