This repository was archived by the owner on Feb 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathresource.class.php
More file actions
63 lines (49 loc) · 2.78 KB
/
resource.class.php
File metadata and controls
63 lines (49 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
/**
* @class resource
* @author NHN (developers@xpressengine.com)
* @brief resource high class
**/
class resource extends ModuleObject {
var $licenses = array( 'GPL v2', 'LGPL v2', 'GPL v3', 'LGPL v3', 'New BSD License', 'MPL 1.1', 'Apache License 2.0', 'MIT/X License', 'zlib/libpng License', 'OFL 1.1', '기타 라이선스');
function moduleInstall() {
$oModuleController = &getController('module');
$oModuleController->insertTrigger('file.downloadFile', 'resource', 'controller', 'triggerUpdateDownloadedCount', 'after');
$oModuleController->insertTrigger('menu.getModuleListInSitemap', 'resource', 'model', 'triggerModuleListInSitemap', 'after');
return new Object();
}
function checkUpdate() {
$oModuleModel = &getModel('module');
if(!$oModuleModel->getTrigger('file.downloadFile', 'resource', 'controller', 'triggerUpdateDownloadedCount', 'after')) return true;
// 2012. 09. 11 when add new menu in sitemap, custom menu add
if(!$oModuleModel->getTrigger('menu.getModuleListInSitemap', 'resource', 'model', 'triggerModuleListInSitemap', 'after')) return true;
return false;
}
function moduleUpdate() {
$oModuleController = &getController('module');
$oModuleModel = &getModel('module');
if(!$oModuleModel->getTrigger('file.downloadFile', 'resource', 'controller', 'triggerUpdateDownloadedCount', 'after'))
$oModuleController->insertTrigger('file.downloadFile', 'resource', 'controller', 'triggerUpdateDownloadedCount', 'after');
// 2012. 09. 11 when add new menu in sitemap, custom menu add
if(!$oModuleModel->getTrigger('menu.getModuleListInSitemap', 'resource', 'model', 'triggerModuleListInSitemap', 'after'))
$oModuleController->insertTrigger('menu.getModuleListInSitemap', 'resource', 'model', 'triggerModuleListInSitemap', 'after');
return new Object(0, 'success_updated');
}
function moduleUninstall() {
$oModuleModel = &getModel('module');
$oModuleController =& getController('module');
if($oModuleModel->getTrigger('file.downloadFile', 'resource', 'controller', 'triggerUpdateDownloadedCount', 'after'))
$oModuleController->deleteTrigger('file.downloadFile', 'resource', 'controller', 'triggerUpdateDownloadedCount', 'after');
$output = executeQueryArray("resource.getAllResources");
if(!$output->data) return new Object();
set_time_limit(0);
foreach($output->data as $resource)
{
$oModuleController->deleteModule($resource->module_srl);
}
return new Object();
}
function recompileCache() {
}
}
?>