mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 14:22:54 +09:00
Register spamfilter, tag, widget module triggers in module.xml
This commit is contained in:
parent
ad1241fbb5
commit
e81d0500eb
6 changed files with 43 additions and 158 deletions
|
|
@ -10,47 +10,27 @@ class widget extends ModuleObject
|
|||
/**
|
||||
* @brief Implement if additional tasks are necessary when installing
|
||||
*/
|
||||
function moduleInstall()
|
||||
public function moduleInstall()
|
||||
{
|
||||
// Create cache directory used by widget
|
||||
FileHandler::makeDir('./files/cache/widget');
|
||||
FileHandler::makeDir('./files/cache/widget_cache');
|
||||
// Add this widget compile the trigger for the display.after
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->insertTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief a method to check if successfully installed
|
||||
*/
|
||||
function checkUpdate()
|
||||
public function checkUpdate()
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
// widget compile display.after trigger for further (04/14/2009)
|
||||
if(!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Execute update
|
||||
*/
|
||||
function moduleUpdate()
|
||||
public function moduleUpdate()
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$oModuleController = getController('module');
|
||||
// widget compile display.after trigger for further (04/14/2009)
|
||||
if(!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before'))
|
||||
{
|
||||
$oModuleController->insertTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Re-generate the cache file
|
||||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
}
|
||||
}
|
||||
/* End of file widget.class.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue