XpressEngine Core
1.11.2
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
modules
rss
rss.controller.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (C) NAVER <http://www.navercorp.com> */
8
class
rssController
extends
rss
9
{
15
function
init
()
16
{
17
}
18
24
function
triggerRssUrlInsert
()
25
{
26
$oModuleModel
=
getModel
(
'module'
);
27
$total_config =
$oModuleModel
->getModuleConfig(
'rss'
);
28
$current_module_srl =
Context::get
(
'module_srl'
);
29
$site_module_info =
Context::get
(
'site_module_info'
);
30
31
if
(is_array($current_module_srl))
32
{
33
unset($current_module_srl);
34
}
35
if
(!$current_module_srl) {
36
$current_module_info =
Context::get
(
'current_module_info'
);
37
$current_module_srl = $current_module_info->module_srl;
38
}
39
40
if
(!$current_module_srl)
return
new
BaseObject
();
41
// Imported rss settings of the selected module
42
$oRssModel =
getModel
(
'rss'
);
43
$rss_config = $oRssModel->getRssModuleConfig($current_module_srl);
44
45
if
($rss_config->open_rss !=
'N'
)
46
{
47
Context::set
(
'rss_url'
, $oRssModel->getModuleFeedUrl(
Context::get
(
'vid'
),
Context::get
(
'mid'
),
'rss'
));
48
Context::set
(
'atom_url'
, $oRssModel->getModuleFeedUrl(
Context::get
(
'vid'
),
Context::get
(
'mid'
),
'atom'
));
49
}
50
51
if
(
Context::isInstalled
() && $site_module_info->mid ==
Context::get
(
'mid'
) && $total_config->use_total_feed !=
'N'
)
52
{
53
if
(
Context::isAllowRewrite
() && !
Context::get
(
'vid'
))
54
{
55
$request_uri =
Context::getRequestUri
();
56
Context::set
(
'general_rss_url'
, $request_uri.
'rss'
);
57
Context::set
(
'general_atom_url'
, $request_uri.
'atom'
);
58
}
59
else
60
{
61
Context::set
(
'general_rss_url'
,
getUrl
(
''
,
'module'
,
'rss'
,
'act'
,
'rss'
));
62
Context::set
(
'general_atom_url'
,
getUrl
(
''
,
'module'
,
'rss'
,
'act'
,
'atom'
));
63
}
64
}
65
66
return
new
BaseObject
();
67
}
68
69
function
triggerCopyModule
(&
$obj
)
70
{
71
$oModuleModel
=
getModel
(
'module'
);
72
$rssConfig =
$oModuleModel
->getModulePartConfig(
'rss'
,
$obj
->originModuleSrl);
73
74
$oModuleController
=
getController
(
'module'
);
75
if
(is_array(
$obj
->moduleSrlList))
76
{
77
foreach
(
$obj
->moduleSrlList AS $key=>$moduleSrl)
78
{
79
$oModuleController
->insertModulePartConfig(
'rss'
, $moduleSrl, $rssConfig);
80
}
81
}
82
}
83
}
84
/* End of file rss.controller.php */
85
/* Location: ./modules/rss/rss.controller.php */
$oModuleModel
$oModuleModel
Definition:
ko.install.php:236
getController
getController($module_name)
Definition:
func.inc.php:90
$obj
$obj
Definition:
ko.install.php:262
BaseObject
Definition:
BaseObject.class.php:9
Context\set
set($key, $val, $set_to_get_vars=0)
Definition:
Context.class.php:1948
rssController
Definition:
rss.controller.php:8
Context\getRequestUri
getRequestUri($ssl_mode=FOLLOW_REQUEST_SSL, $domain=null)
Definition:
Context.class.php:1849
getModel
getModel($module_name)
Definition:
func.inc.php:145
rssController\triggerCopyModule
triggerCopyModule(&$obj)
Definition:
rss.controller.php:69
Context\get
get($key)
Definition:
Context.class.php:1973
rss
Definition:
rss.class.php:8
$oModuleController
$oModuleController
Definition:
ko.install.php:287
rssController\init
init()
Definition:
rss.controller.php:15
getUrl
getUrl()
Definition:
func.inc.php:297
rssController\triggerRssUrlInsert
triggerRssUrlInsert()
Definition:
rss.controller.php:24
Context\isAllowRewrite
isAllowRewrite()
Definition:
Context.class.php:2644
Context\isInstalled
isInstalled()
Definition:
Context.class.php:2623
Generated on Tue Dec 18 2018 17:04:29 for XpressEngine Core by
1.8.5