mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
#331 쪽지보내기와 친구등록 메뉴가 나오지않았던 문제 수정
This commit is contained in:
parent
929a694ee1
commit
a50695f047
2 changed files with 85 additions and 100 deletions
|
|
@ -9,8 +9,10 @@
|
|||
class communication extends ModuleObject
|
||||
{
|
||||
private $triggers = array(
|
||||
array('moduleHandler.init', 'communication', 'controller', 'triggerModuleHandlerAfter', 'after')
|
||||
array('moduleHandler.init', 'communication', 'controller', 'triggerModuleHandlerBefore', 'before'),
|
||||
array('member.getMemberMenu', 'communication', 'controller', 'triggerMemberMenu', 'before')
|
||||
);
|
||||
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
* @return Object
|
||||
|
|
@ -18,6 +20,7 @@ class communication extends ModuleObject
|
|||
function moduleInstall()
|
||||
{
|
||||
$oModuleController = getController('module');
|
||||
|
||||
foreach($this->triggers as $trigger)
|
||||
{
|
||||
$oModuleController->insertTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]);
|
||||
|
|
@ -25,6 +28,7 @@ class communication extends ModuleObject
|
|||
|
||||
// Create a temporary file storage for one new private message notification
|
||||
FileHandler::makeDir('./files/member_extra_info/new_message_flags');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -34,28 +38,8 @@ class communication extends ModuleObject
|
|||
*/
|
||||
function checkUpdate()
|
||||
{
|
||||
if(!is_dir("./files/member_extra_info/new_message_flags"))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('message');
|
||||
|
||||
if($config->skin)
|
||||
{
|
||||
$config_parse = explode('.', $config->skin);
|
||||
if(count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/communication/', $config_parse[0]);
|
||||
if(is_dir($template_path))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
|
||||
foreach($this->triggers as $trigger)
|
||||
{
|
||||
if(!$oModuleModel->getTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]))
|
||||
|
|
@ -63,6 +47,12 @@ class communication extends ModuleObject
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if(!is_dir("./files/member_extra_info/new_message_flags"))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -72,13 +62,9 @@ class communication extends ModuleObject
|
|||
*/
|
||||
function moduleUpdate()
|
||||
{
|
||||
if(!is_dir("./files/member_extra_info/new_message_flags"))
|
||||
{
|
||||
FileHandler::makeDir('./files/member_extra_info/new_message_flags');
|
||||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$oModuleController = getController('module');
|
||||
|
||||
foreach($this->triggers as $trigger)
|
||||
{
|
||||
if(!$oModuleModel->getTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]))
|
||||
|
|
@ -86,24 +72,10 @@ class communication extends ModuleObject
|
|||
$oModuleController->insertTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]);
|
||||
}
|
||||
}
|
||||
$config = $oModuleModel->getModuleConfig('message');
|
||||
if(!is_object($config))
|
||||
|
||||
if(!is_dir("./files/member_extra_info/new_message_flags"))
|
||||
{
|
||||
$config = new stdClass();
|
||||
}
|
||||
|
||||
if($config->skin)
|
||||
{
|
||||
$config_parse = explode('.', $config->skin);
|
||||
if(count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/communication/', $config_parse[0]);
|
||||
if(is_dir($template_path))
|
||||
{
|
||||
$config->skin = implode('|@|', $config_parse);
|
||||
$oModuleController->updateModuleConfig('communication', $config);
|
||||
}
|
||||
}
|
||||
FileHandler::makeDir('./files/member_extra_info/new_message_flags');
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue