mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
module이 없는 경우에 애드온 활성화되면 아예 생성이 안되는 문제 해결 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4558 201d5d3c-b55e-5fd7-737f-ddc643e51545
38 lines
971 B
PHP
38 lines
971 B
PHP
<?php
|
|
if(!defined("__ZBXE__")) exit();
|
|
|
|
if(Context::getRequestMethod() == "XMLRPC" || Context::getResponseMethod() == "XMLRPC")
|
|
{
|
|
return;
|
|
}
|
|
|
|
if(Context::getRequestMethod() == "POST" && $called_position == 'before_module_proc') {
|
|
$mode = $_REQUEST['mode'];
|
|
if(!$mode || $mode != "fb")
|
|
{
|
|
return;
|
|
}
|
|
$oController = &getController('tccommentnotify');
|
|
if(!$oController) return;
|
|
$oController->procNotifyReceived();
|
|
return;
|
|
}
|
|
|
|
if($called_position == "after_module_proc")
|
|
{
|
|
$oModel = &getModel('tccommentnotify');
|
|
if(!$oModel) return;
|
|
if($oModel->checkShouldNotify())
|
|
{
|
|
$scriptCode = <<<EndOfScript
|
|
<script type="text/javascript">
|
|
// <![CDATA[
|
|
exec_xml("tccommentnotify", "procDoNotify");
|
|
// ]]>
|
|
</script>
|
|
|
|
EndOfScript;
|
|
Context::addHtmlHeader($scriptCode);
|
|
}
|
|
}
|
|
?>
|