mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-12 13:32:16 +09:00
#1660 추가 개선
- Feed URL을 표시할 때 절대 경로로 표현 - rssModel::getModuleFeedUrl() URL 반환 개선
This commit is contained in:
parent
eb2fe8c76b
commit
47220f3b93
2 changed files with 7 additions and 15 deletions
|
|
@ -55,7 +55,7 @@ class rssAdminView extends rss
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!$total_config->feed_document_count) $total_config->feed_document_count = 15;
|
if(!$total_config->feed_document_count) $total_config->feed_document_count = 15;
|
||||||
$total_config->url = $oRssModel->getModuleFeedUrl(NULL, '', 'rss');
|
$total_config->url = $oRssModel->getModuleFeedUrl(NULL, '', 'rss', true);
|
||||||
|
|
||||||
Context::set('feed_config', $feed_config);
|
Context::set('feed_config', $feed_config);
|
||||||
Context::set('total_config', $total_config);
|
Context::set('total_config', $total_config);
|
||||||
|
|
|
||||||
|
|
@ -12,27 +12,19 @@ class rssModel extends rss
|
||||||
*
|
*
|
||||||
* @param string $vid Vid
|
* @param string $vid Vid
|
||||||
* @param string $mid mid
|
* @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
|
* @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();
|
return getFullUrl('','vid',$vid, 'mid',$mid, 'act',$format);
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return getUrl('','mid',$mid,'act',$format);
|
return getUrl('','vid',$vid, 'mid',$mid, 'act',$format);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue