-
Notifications
You must be signed in to change notification settings - Fork 0
/
syndication.admin.view.php
64 lines (50 loc) · 1.96 KB
/
syndication.admin.view.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/* Copyright (C) DAOL Project <http://www.daolcms.org> */
/**
* @class syndicationAdminView
* @author NAVER (developers@xpressengine.com)
* @brief syndication admin view class
**/
class syndicationAdminView extends syndication {
function init(){
}
public function dispSyndicationAdminConfig(){
$oModuleModel = getModel('module');
$module_config = $oModuleModel->getModuleConfig('syndication');
$oSyndicationModel = getModel('syndication');
Context::set('ping_log', $oSyndicationModel->getResentPingLog());
if(!$module_config->syndication_use){
$module_config->syndication_use = 'Y';
}
if(!$module_config->site_url){
$module_config->site_url = Context::getDefaultUrl()?Context::getDefaultUrl():getFullUrl();
}
if(!$module_config->year){
$module_config->year = date("Y");
}
if(!isset($module_config->syndication_password)){
$module_config->syndication_password = uniqid();
}
Context::set('syndication_use', $module_config->syndication_use);
Context::set('site_url', preg_replace('/^(http|https):\/\//i','',$module_config->site_url));
Context::set('year', $module_config->year);
Context::set('syndication_token', $module_config->syndication_token);
Context::set('syndication_password', $module_config->syndication_password);
Context::set('uri_scheme', (Context::getSslStatus() == 'always') ? 'https://' : 'http://');
$output = executeQueryArray('syndication.getExceptModules');
$except_module_list = array();
if($output->data && count($output->data) > 0){
foreach($output->data as $item){
$except_module_list[] = $item;
}
}
Context::set('except_module', $except_module_list);
//Security
$security = new Security();
$security->encodeHTML('services..service','except_module..ping');
$security->encodeHTML('except_module..mid','except_module..browser_title');
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('config');
}
}