XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
rss.admin.view.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
8 class rssAdminView extends rss
9 {
15  function init()
16  {
17  //Set template path
18  $this->setTemplatePath($this->module_path.'tpl');
19  }
20 
26  function dispRssAdminIndex()
27  {
28  $oModuleModel = getModel('module');
29  $rss_config = $oModuleModel->getModulePartConfigs('rss');
30  $total_config = $oModuleModel->getModuleConfig('rss');
31  if(!$total_config)
32  {
33  $total_config = new stdClass();
34  }
35  $oRssModel = getModel('rss');
36 
37  if($rss_config)
38  {
39  $feed_config = array();
40  foreach($rss_config as $module_srl => $config)
41  {
42  if($config)
43  {
44  $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
45  $columnList = array('sites.domain');
46  $site = $oModuleModel->getSiteInfo($module_info->site_srl, $columnList);
47  if(!strpos($site->domain, '.')) $vid = $site->domain;
48  else $site = null;
49  if($site) $feed_config[$module_srl]['url'] = $oRssModel->getModuleFeedUrl($vid, $module_info->mid, 'rss');
50  $feed_config[$module_srl]['mid'] = $module_info->mid;
51  $feed_config[$module_srl]['open_feed'] = $config->open_rss;
52  $feed_config[$module_srl]['open_total_feed'] = $config->open_total_feed;
53  $feed_config[$module_srl]['feed_description'] = $config->feed_description;
54  }
55  }
56  }
57  if(!$total_config->feed_document_count) $total_config->feed_document_count = 15;
58  $total_config->url = $oRssModel->getModuleFeedUrl(NULL, '', 'rss', true);
59 
60  Context::set('feed_config', $feed_config);
61  Context::set('total_config', $total_config);
62 
63  $security = new Security();
64  $security->encodeHTML('feed_config..mid','feed_config..url');
65  $security->encodeHTML('total_config..');
66 
67  $this->setTemplatePath($this->module_path.'tpl');
68  $this->setTemplateFile('rss_admin_index');
69  }
70 }
71 /* End of file rss.admin.view.php */
72 /* Location: ./modules/rss/rss.admin.view.php */
setTemplateFile($filename)
$oModuleModel
Definition: ko.install.php:236
set($key, $val, $set_to_get_vars=0)
$module_srl
integer value to represent a run-time instance of Module (XE Module)
$module_info
an object containing the module information
getModel($module_name)
Definition: func.inc.php:145
Definition: rss.class.php:8