mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
add function getFullSiteUrl()
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6732 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f29d0d3a19
commit
5ad8df2215
1 changed files with 30 additions and 3 deletions
|
|
@ -226,11 +226,15 @@
|
||||||
function getFullUrl() {
|
function getFullUrl() {
|
||||||
$num_args = func_num_args();
|
$num_args = func_num_args();
|
||||||
$args_list = func_get_args();
|
$args_list = func_get_args();
|
||||||
|
$request_uri = Context::getRequestUri();
|
||||||
if(!$num_args) return Context::getRequestUri();
|
if(!$num_args) return $request_uri;
|
||||||
|
|
||||||
$url = Context::getUrl($num_args, $args_list);
|
$url = Context::getUrl($num_args, $args_list);
|
||||||
if(!preg_match('/^http/i',$url)) return substr(Context::getRequestUri(),0,-1).$url;
|
if(!preg_match('/^http/i',$url)){
|
||||||
|
preg_match('/^(http|https):\/\/([^\/]+)\//',$request_uri,$match);
|
||||||
|
$url = Context::getUrl($num_args, $args_list);
|
||||||
|
return substr($match[0],0,-1).$url;
|
||||||
|
}
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -253,6 +257,29 @@
|
||||||
return Context::getUrl($num_args, $args_list, $domain);
|
return Context::getUrl($num_args, $args_list, $domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief getSiteUrl()의 값에 request uri를 추가하여 reutrn
|
||||||
|
* full url을 얻기 위함
|
||||||
|
**/
|
||||||
|
function getFullSiteUrl() {
|
||||||
|
$num_args = func_num_args();
|
||||||
|
$args_list = func_get_args();
|
||||||
|
|
||||||
|
$request_uri = Context::getRequestUri();
|
||||||
|
if(!$num_args) return $request_uri;
|
||||||
|
|
||||||
|
$domain = array_shift($args_list);
|
||||||
|
$num_args = count($args_list);
|
||||||
|
|
||||||
|
$url = Context::getUrl($num_args, $args_list, $domain);
|
||||||
|
if(!preg_match('/^http/i',$url)){
|
||||||
|
preg_match('/^(http|https):\/\/([^\/]+)\//',$request_uri,$match);
|
||||||
|
$url = Context::getUrl($num_args, $args_list);
|
||||||
|
return substr($match[0],0,-1).$url;
|
||||||
|
}
|
||||||
|
return $url;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 가상사이트의 Domain이 url형식인지 site id인지 return
|
* @brief 가상사이트의 Domain이 url형식인지 site id인지 return
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue