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 — develop ( 834310...97aa84 )
by gyeong-won
08:57
created

syndication::checkUpdate()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 5
nc 3
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/* Copyright (C) NAVER <http://www.navercorp.com> */
3
4
/**
5
 * @class  syndication
6
 * @author NAVER ([email protected])
7
 * @brief syndication module's high class
8
 * @todo site 전체의 문서를 연동하거나 게시판 메뉴 삭제 시 관련 게시판 내용 전체를 syndication과 연동하는 처리가 되어있지 않음.
9
 *			model 파일에서 처리 방식은 구현했으나 한번 시작되면 전체 문서를 종료할 때까지 계속 ping을 전송해야 하는 부담이 있음.
10
 **/
11
12
define('SyndicationModule', 'M');
13
define('SyndicationDocument', 'D');
14
15
define('SyndicationInserted', 'I');
16
define('SyndicationUpdated', 'U');
17
define('SyndicationDeleted', 'D');
18
19
class syndication extends ModuleObject {
20
21
	var $services = array(
22
		'Naver' => 'http://syndication.openapi.naver.com/ping/',
23
	);
24
25
	var $statuses = array(
26
		'Naver' => 'http://syndication.openapi.naver.com/status/?site=%s',
27
	);
28
29
	function moduleInstall() {
30
		$oModuleController = getController('module');
31
		$oModuleController->insertTrigger('document.insertDocument', 'syndication', 'controller', 'triggerInsertDocument', 'after');
32
		$oModuleController->insertTrigger('document.updateDocument', 'syndication', 'controller', 'triggerUpdateDocument', 'after');
33
		$oModuleController->insertTrigger('document.deleteDocument', 'syndication', 'controller', 'triggerDeleteDocument', 'after');
34
		$oModuleController->insertTrigger('module.deleteModule', 'syndication', 'controller', 'triggerDeleteModule', 'after');
35
36
		$oModuleController->insertTrigger('document.moveDocumentToTrash', 'syndication', 'controller', 'triggerMoveDocumentToTrash', 'after');
37
		// $oModuleController->insertTrigger('document.restoreTrash', 'syndication', 'controller', 'triggerRestoreTrash', 'after');
38
		$oModuleController->insertTrigger('document.moveDocumentModule', 'syndication', 'controller', 'triggerMoveDocumentModule', 'after');
39
40
		$oAddonAdminModel = getAdminModel('addon');
41
		if($oAddonAdminModel->getAddonInfoXml('catpcha')){
42
			$oAddonAdminController = &addonAdminController::getInstance();
0 ignored issues
show
Bug introduced by
The method getInstance() does not seem to exist on object<addonAdminController>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
43
			$oAddonAdminController->doActivate('catpcha');
44
			$oAddonAdminController->makeCacheFile();
45
		}
46
	}
47
48
	function checkUpdate() {
49
		$oModuleModel = getModel('module');
50
		if(!$oModuleModel->getTrigger('document.moveDocumentToTrash', 'syndication', 'controller', 'triggerMoveDocumentToTrash', 'after')) return true;
51
		// if(!$oModuleModel->getTrigger('document.restoreTrash', 'syndication', 'controller', 'triggerRestoreTrash', 'after')) return true;
52
		if(!$oModuleModel->getTrigger('document.moveDocumentModule', 'syndication', 'controller', 'triggerMoveDocumentModule', 'after')) return true;
53
54
		return false;
55
	}
56
57
	function moduleUpdate() {
58
		$oModuleModel = getModel('module');
59
		$oModuleController = getController('module');
60
61
		if(!$oModuleModel->getTrigger('document.moveDocumentToTrash', 'syndication', 'controller', 'triggerMoveDocumentToTrash', 'after')){
62
			$oModuleController->insertTrigger('document.moveDocumentToTrash', 'syndication', 'controller', 'triggerMoveDocumentToTrash', 'after');
63
		}
64
		// if(!$oModuleModel->getTrigger('document.restoreTrash', 'syndication', 'controller', 'triggerRestoreTrash', 'after')){
65
		// 	$oModuleController->insertTrigger('document.restoreTrash', 'syndication', 'controller', 'triggerRestoreTrash', 'after');
66
		// }
67
		if(!$oModuleModel->getTrigger('document.moveDocumentModule', 'syndication', 'controller', 'triggerMoveDocumentModule', 'after')){
68
			$oModuleController->insertTrigger('document.moveDocumentModule', 'syndication', 'controller', 'triggerMoveDocumentModule', 'after');
69
		}
70
71
		$oAddonAdminModel = getAdminModel('addon');
72
		if($oAddonAdminModel->getAddonInfoXml('catpcha')){
73
			$oAddonAdminController = &addonAdminController::getInstance();
0 ignored issues
show
Bug introduced by
The method getInstance() does not seem to exist on object<addonAdminController>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
74
			$oAddonAdminController->doActivate('catpcha');
75
			$oAddonAdminController->makeCacheFile();
76
		}
77
	}
78
79
	function recompileCache() {
80
	}
81
82
	function checkOpenSSLSupport()
83
	{
84
		if(!in_array('ssl', stream_get_transports())) {
85
			return FALSE;
86
		}
87
		return TRUE;
88
	}
89
90
	public function makeObject($code = 0, $message = 'success')
91
	{
92
		return class_exists('BaseObject') ? new BaseObject($code, $message) : new Object($code, $message);
93
	}
94
}
95