mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
RSS 주소 링크 안뜨는 문제 수정, RSS 링크-리라이트 모드 사용시 규칙에 따라 간단한 주소 사용
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6485 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6322c88e2a
commit
9da646c2b2
4 changed files with 50 additions and 9 deletions
|
|
@ -43,9 +43,6 @@
|
|||
<!--@if($rss_url)-->
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$rss_url}" />
|
||||
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{$atom_url}" />
|
||||
<!--@elseif(Context::isInstalled() && $site_module_info->mid == $mid)-->
|
||||
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{getUrl('','module','rss','act','rss')}" />
|
||||
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{getUrl('','module','rss','act','atom')}" />
|
||||
<!--@end-->
|
||||
|
||||
{@ $ssl_actions = Context::getSSLActions() }
|
||||
|
|
|
|||
12
modules/module/queries/deleteTrigger.xml
Normal file
12
modules/module/queries/deleteTrigger.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<query id="insertTrigger" action="delete">
|
||||
<tables>
|
||||
<table name="module_trigger" />
|
||||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="trigger_name" var="trigger_name" notnull="notnull" />
|
||||
<condition operation="equal" column="module" var="module" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="type" var="type" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="called_method" var="called_method" notnull="notnull" pipe="and" />
|
||||
<condition operation="equal" column="called_position" var="called_position" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before');
|
||||
|
||||
// 2007. 10. 19 출력하기 전에 rss url을 세팅하는 트리거 호출
|
||||
$oModuleController->insertTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before');
|
||||
$oModuleController->insertTrigger('moduleHandler.proc', 'rss', 'controller', 'triggerRssUrlInsert', 'after');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
|
@ -39,7 +39,9 @@
|
|||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before')) return true;
|
||||
|
||||
// 2007. 10. 19 출력하기 전에 rss url을 세팅하는 트리거 호출
|
||||
if(!$oModuleModel->getTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before')) return true;
|
||||
if(!$oModuleModel->getTrigger('moduleHandler.proc', 'rss', 'controller', 'triggerRssUrlInsert', 'after')) return true;
|
||||
|
||||
if($oModuleModel->getTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -60,8 +62,10 @@
|
|||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before');
|
||||
|
||||
// 2007. 10. 19 출력하기 전에 rss url을 세팅하는 트리거 호출
|
||||
if(!$oModuleModel->getTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before'))
|
||||
$oModuleController->insertTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before');
|
||||
if(!$oModuleModel->getTrigger('moduleHandler.proc', 'rss', 'controller', 'triggerRssUrlInsert', 'after'))
|
||||
$oModuleController->insertTrigger('moduleHandler.proc', 'rss', 'controller', 'triggerRssUrlInsert', 'after');
|
||||
if($oModuleModel->getTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before'))
|
||||
$oModuleController->deleteTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before');
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
**/
|
||||
function triggerRssUrlInsert() {
|
||||
$current_module_srl = Context::get('module_srl');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
if(!$current_module_srl) {
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
|
|
@ -33,8 +34,35 @@
|
|||
$oRssModel = &getModel('rss');
|
||||
$rss_config = $oRssModel->getRssModuleConfig($current_module_srl);
|
||||
|
||||
if($rss_config->open_rss != 'N') Context::set('rss_url', getUrl('','mid',Context::get('mid'),'act','rss'));
|
||||
if($rss_config->open_rss != 'N') Context::set('atom_url', getUrl('','mid',Context::get('mid'),'act','atom'));
|
||||
if($rss_config->open_rss != 'N') {
|
||||
if(Context::isAllowRewrite()) {
|
||||
$request_uri = Context::getRequestUri();
|
||||
if(Context::get('vid')) {
|
||||
Context::set('rss_url', Context::getRequestUri().Context::get('vid').'/'.Context::get('mid').'/rss');
|
||||
Context::set('atom_url', Context::getRequestUri().Context::get('vid').'/'.Context::get('mid').'/atom');
|
||||
}
|
||||
else {
|
||||
Context::set('rss_url', $request_uri.Context::get('mid').'/rss');
|
||||
Context::set('atom_url', $request_uri.Context::get('mid').'/atom');
|
||||
}
|
||||
}
|
||||
else {
|
||||
Context::set('rss_url', getUrl('','mid',Context::get('mid'),'act','rss'));
|
||||
Context::set('atom_url', getUrl('','mid',Context::get('mid'),'act','atom'));
|
||||
}
|
||||
}
|
||||
|
||||
if(Context::isInstalled() && $site_module_info->mid == Context::get('mid')) {
|
||||
if(Context::isAllowRewrite() && !Context::get('vid')) {
|
||||
$request_uri = Context::getRequestUri();
|
||||
Context::set('rss_url', $request_uri.'rss');
|
||||
Context::set('atom_url', $request_uri.'atom');
|
||||
}
|
||||
else {
|
||||
Context::set('rss_url', getUrl('','module','rss','act','rss'));
|
||||
Context::set('atom_url', getUrl('','module','rss','act','atom'));
|
||||
}
|
||||
}
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue