GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 423fe8...f48289 )
by gyeong-won
15:56 queued 08:14
created

rss::moduleUpdate()   C

Complexity

Conditions 7
Paths 33

Size

Total Lines 30
Code Lines 17

Duplication

Lines 6
Ratio 20 %

Importance

Changes 0
Metric Value
cc 7
eloc 17
nc 33
nop 0
dl 6
loc 30
rs 6.7272
c 0
b 0
f 0
1
<?php
2
/* Copyright (C) NAVER <http://www.navercorp.com> */
3
/**
4
 * High class of rss module
5
 *
6
 * @author NAVER ([email protected])
7
 */
8
class rss extends ModuleObject
9
{
10
	public $gzhandler_enable = false;
11
12
	/**
13
	 * Additional tasks required to accomplish during the installation
14
	 *
15
	 * @return Object
16
	 */
17
	function moduleInstall()
18
	{
19
		// Register in action forward
20
		$oModuleController = getController('module');
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 Object();
30
	}
31
32
	/**
33
	 * A method to check if the installation has been successful
34
	 * @return bool
35
	 */
36
	function checkUpdate()
37
	{
38
		$oModuleModel = getModel('module');
39
		$oModuleController = getController('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
61
	/**
62
	 * Execute update
63
	 *
64
	 * @return Object
65
	 */
66
	function moduleUpdate()
67
	{
68
		$oModuleModel = getModel('module');
69
		$oModuleController = getController('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 View Code Duplication
			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 View Code Duplication
			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 Object(0, 'success_updated');
95
	}
96
97
	/**
98
	 * Re-generate the cache file
99
	 *
100
	 * @return void
101
	 */
102
	function recompileCache()
103
	{
104
	}
105
}
106
/* End of file rss.class.php */
107
/* Location: ./modules/rss/rss.class.php */
108