소스 검색

make error 404 template usable as stand alone php file

tags/v3.0
Robin Appelman 13 년 전
부모
커밋
1c300bb49b
2개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 7
    0
      plugins/publiclink/get.php
  2. 10
    0
      templates/404.php

+ 7
- 0
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);

+ 10
- 0
templates/404.php 파일 보기

@@ -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">
<img src="<?php echo image_path("", "weather-clear.png"); ?>" alt="ownCloud" />
<ul>

Loading…
취소
저장