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