mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
#439 php의 결과물과 javascript의 setQuery함수에 index.php 파일 지정 없이 /?... 등으로 지정될 경우 index.php를 명시적으로 추가하도록 하여 index.html파일등이 있더라도 문제 없도록 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4065 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e25d48baef
commit
4858c14c17
2 changed files with 8 additions and 3 deletions
|
|
@ -892,6 +892,9 @@
|
|||
// <img|br> 코드 변환
|
||||
$content = preg_replace('/<(img|br)([^>\/]*)(\/>|>)/i','<$1$2 />', $content);
|
||||
|
||||
// 주소/?mid등과 같은 index.php가 명시되지 않은 파일의 target 변경
|
||||
$content = str_replace(Context::getRequestUri().'?',Context::getRequestUri().'index.php?',$content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ String.prototype.setQuery = function(key, val) {
|
|||
var idx = this.indexOf('?');
|
||||
var uri = this;
|
||||
uri = uri.replace(/#$/,'');
|
||||
|
||||
if(idx != -1) {
|
||||
uri = this.substr(0, idx);
|
||||
var query_string = this.substr(idx+1, this.length);
|
||||
|
|
@ -43,11 +44,12 @@ String.prototype.setQuery = function(key, val) {
|
|||
|
||||
q_list[q_list.length] = i+'='+arg;
|
||||
}
|
||||
return uri+"?"+q_list.join("&");
|
||||
uri = uri+"?"+q_list.join("&");
|
||||
} else {
|
||||
if(val.toString().trim()) return uri+"?"+key+"="+val;
|
||||
else return uri;
|
||||
if(val.toString().trim()) uri = uri+"?"+key+"="+val;
|
||||
}
|
||||
uri = uri.replace(request_uri+'?',request_uri+'index.php?');
|
||||
return uri;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue