#1660 추가 개선

- Feed URL을 표시할 때 절대 경로로 표현
- rssModel::getModuleFeedUrl() URL 반환 개선
This commit is contained in:
bnu 2015-08-17 18:09:43 +09:00
parent eb2fe8c76b
commit 47220f3b93
2 changed files with 7 additions and 15 deletions

View file

@ -12,27 +12,19 @@ class rssModel extends rss
*
* @param string $vid Vid
* @param string $mid mid
* @param string $format Feed format. ef)xe, atom, rss1.0
* @param string $format Feed format. rss | atom
* @param bool $absolute_url
* @return string
*/
function getModuleFeedUrl($vid = null, $mid, $format)
function getModuleFeedUrl($vid, $mid, $format = 'rss', $absolute_url = false)
{
if(Context::isAllowRewrite())
if($absolute_url)
{
$request_uri = Context::getRequestUri();
// If the virtual site variable exists and it is different from mid (vid and mid should not be the same)
if($vid && $vid != $mid)
{
return $request_uri.$vid.'/'.$mid.'/'.$format;
}
else
{
return $request_uri.$mid.'/'.$format;
}
return getFullUrl('','vid',$vid, 'mid',$mid, 'act',$format);
}
else
{
return getUrl('','mid',$mid,'act',$format);
return getUrl('','vid',$vid, 'mid',$mid, 'act',$format);
}
}