XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
rss.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
8 class rss extends ModuleObject
9 {
10  public $gzhandler_enable = false;
11 
17  function moduleInstall()
18  {
19  // Register in action forward
21 
22  $oModuleController->insertActionForward('rss', 'view', 'rss');
23  $oModuleController->insertActionForward('rss', 'view', 'atom');
24  // 2007.10.18 Add a trigger for participating additional configurations of the service module
25  $oModuleController->insertTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before');
26  // 2007. 10. 19 Call the trigger to set RSS URL before outputing
27  $oModuleController->insertTrigger('moduleHandler.proc', 'rss', 'controller', 'triggerRssUrlInsert', 'after');
28 
29  return new BaseObject();
30  }
31 
36  function checkUpdate()
37  {
38  $oModuleModel = getModel('module');
40  $version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
41  if($oModuleModel->needUpdate($version_update_id))
42  {
43  // Add the Action forward for atom
44  if(!$oModuleModel->getActionForward('atom')) return true;
45  // 2007. 10. Add a trigger for participating additional configurations of the service module
46  if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before')) return true;
47  // 2007. 10. 19 Call the trigger to set RSS URL before outputing
48  if(!$oModuleModel->getTrigger('moduleHandler.proc', 'rss', 'controller', 'triggerRssUrlInsert', 'after')) return true;
49 
50  if($oModuleModel->getTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before')) return true;
51 
52  // 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
53  if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'rss', 'controller', 'triggerCopyModule', 'after')) return true;
54 
55  $oModuleController->insertUpdatedLog($version_update_id);
56  }
57 
58  return false;
59  }
60 
66  function moduleUpdate()
67  {
68  $oModuleModel = getModel('module');
70  $version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
71  if($oModuleModel->needUpdate($version_update_id))
72  {
73  // Add atom act
74  if(!$oModuleModel->getActionForward('atom'))
75  $oModuleController->insertActionForward('rss', 'view', 'atom');
76  // 2007. 10. An additional set of 18 to participate in a service module, add a trigger
77  if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before'))
78  $oModuleController->insertTrigger('module.dispAdditionSetup', 'rss', 'view', 'triggerDispRssAdditionSetup', 'before');
79  // 2007. 10. 19 outputs the trigger before you call to set up rss url
80  if(!$oModuleModel->getTrigger('moduleHandler.proc', 'rss', 'controller', 'triggerRssUrlInsert', 'after'))
81  $oModuleController->insertTrigger('moduleHandler.proc', 'rss', 'controller', 'triggerRssUrlInsert', 'after');
82  if($oModuleModel->getTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before'))
83  $oModuleController->deleteTrigger('display', 'rss', 'controller', 'triggerRssUrlInsert', 'before');
84 
85  // 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
86  if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'rss', 'controller', 'triggerCopyModule', 'after'))
87  {
88  $oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'rss', 'controller', 'triggerCopyModule', 'after');
89  }
90 
91  $oModuleController->insertUpdatedLog($version_update_id);
92  }
93 
94  return new BaseObject(0, 'success_updated');
95  }
96 
102  function recompileCache()
103  {
104  }
105 }
106 /* End of file rss.class.php */
107 /* Location: ./modules/rss/rss.class.php */
$oModuleModel
Definition: ko.install.php:236
getController($module_name)
Definition: func.inc.php:90
const __XE_VERSION__
Definition: config.inc.php:32
moduleUpdate()
Definition: rss.class.php:66
recompileCache()
Definition: rss.class.php:102
moduleInstall()
Definition: rss.class.php:17
checkUpdate()
Definition: rss.class.php:36
getModel($module_name)
Definition: func.inc.php:145
$gzhandler_enable
Definition: rss.class.php:10
Definition: rss.class.php:8
$oModuleController
Definition: ko.install.php:287