-
Notifications
You must be signed in to change notification settings - Fork 4
/
beluxe.class.php
72 lines (55 loc) · 2.8 KB
/
beluxe.class.php
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
64
65
66
67
68
69
70
71
72
<?php
/**
* @class beluxe
* @author phiDel ([email protected])
* @brief class of the BoardDX module
*/
define('__XEFM_NAME__', 'beluxe');
define('__XEFM_PATH__', _XE_PATH_.'modules/' . __XEFM_NAME__ . '/');
define('__XEFM_ORDER__', 'list_order,regdate,update_order,readed_count,voted_count,blamed_count,comment_count,title,random');
if (file_exists(__XEFM_PATH__ . 'classes.item.php')) require_once (__XEFM_PATH__ . 'classes.item.php');
class beluxe extends ModuleObject
{
/* @brief Install the module */
function moduleInstall() {
$cmModule = &getModel('module');
$ccModule = &getController('module');
if (file_exists(__XEFM_PATH__ . 'schemas/file_downloaded_log.xml')) {
if (!$cmModule->getTrigger('file.downloadFile', 'beluxe', 'controller', 'triggerBeforeDownloadFile', 'before')) $ccModule->insertTrigger('file.downloadFile', 'beluxe', 'controller', 'triggerBeforeDownloadFile', 'before');
if (!$cmModule->getTrigger('file.downloadFile', 'beluxe', 'controller', 'triggerDownloadFile', 'after')) $ccModule->insertTrigger('file.downloadFile', 'beluxe', 'controller', 'triggerDownloadFile', 'after');
}
// 2011. 09. 20 when add new menu in sitemap, custom menu add
if(!$cmModule->getTrigger('menu.getModuleListInSitemap', 'beluxe', 'model', 'triggerModuleListInSitemap', 'after')) $ccModule->insertTrigger('menu.getModuleListInSitemap', 'beluxe', 'model', 'triggerModuleListInSitemap', 'after');
return new Object();
}
/* @brief Check the module */
function checkUpdate() {
$cmModule = &getModel('module');
if (file_exists(__XEFM_PATH__ . 'schemas/file_downloaded_log.xml')) {
if (!$cmModule->getTrigger('file.downloadFile', 'beluxe', 'controller', 'triggerBeforeDownloadFile', 'before')) return TRUE;
if (!$cmModule->getTrigger('file.downloadFile', 'beluxe', 'controller', 'triggerDownloadFile', 'after')) return TRUE;
}
// 2011. 09. 20 when add new menu in sitemap, custom menu add
if(!$cmModule->getTrigger('menu.getModuleListInSitemap', 'beluxe', 'model', 'triggerModuleListInSitemap', 'after')) return TRUE;
return FALSE;
}
/* @brief Updaet the module */
function moduleUpdate() {
$this->moduleInstall();
return new Object(0, 'success_updated');
}
/* @brief Uninstall the module */
function moduleUninstall() {
$ccModule = &getController('module');
$ccModule->deleteTrigger('file.downloadFile', 'beluxe', 'controller', 'triggerBeforeDownloadFile', 'before');
$ccModule->deleteTrigger('file.downloadFile', 'beluxe', 'controller', 'triggerDownloadFile', 'after');
$ccModule->deleteTrigger('menu.getModuleListInSitemap', 'beluxe', 'model', 'triggerModuleListInSitemap', 'after');
$this->recompileCache();
return new Object();
}
/* @brief create the cache */
function recompileCache() {
}
}
/* End of file beluxe.class.php */
/* Location: ./modules/beluxe/beluxe.class.php */