mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Clean up trigger registration code in document, comment, file, editor modules
This commit is contained in:
parent
79808ee285
commit
f3bc9a2f03
8 changed files with 42 additions and 340 deletions
|
|
@ -19,20 +19,9 @@ class Comment extends ModuleObject
|
||||||
function moduleInstall()
|
function moduleInstall()
|
||||||
{
|
{
|
||||||
$oDB = DB::getInstance();
|
$oDB = DB::getInstance();
|
||||||
|
|
||||||
// register the action forward (for using on the admin mode)
|
|
||||||
$oModuleController = getController('module');
|
|
||||||
|
|
||||||
$oDB->addIndex(
|
$oDB->addIndex(
|
||||||
"comments", "idx_module_list_order", array("module_srl", "list_order"), TRUE
|
"comments", "idx_module_list_order", array("module_srl", "list_order"), TRUE
|
||||||
);
|
);
|
||||||
|
|
||||||
// 2007. 10. 17 add a trigger to delete comments together with posting deleted
|
|
||||||
$oModuleController->insertTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after');
|
|
||||||
// 2007. 10. 17 add a trigger to delete all of comments together with module deleted
|
|
||||||
$oModuleController->insertTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after');
|
|
||||||
// 2008. 02. 22 add comment setting when a new module added
|
|
||||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -42,33 +31,11 @@ class Comment extends ModuleObject
|
||||||
function checkUpdate()
|
function checkUpdate()
|
||||||
{
|
{
|
||||||
$oDB = DB::getInstance();
|
$oDB = DB::getInstance();
|
||||||
|
|
||||||
// 2007. 10. 17 add a trigger to delete comments together with posting deleted
|
|
||||||
if(!ModuleModel::getTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after'))
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
// 2007. 10. 17 add a trigger to delete all of comments together with module deleted
|
|
||||||
if(!ModuleModel::getTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after'))
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
// 2008. 02. 22 add comment setting when a new module added
|
|
||||||
if(!ModuleModel::getTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before'))
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
if(!$oDB->isIndexExists("comments", "idx_module_list_order"))
|
if(!$oDB->isIndexExists("comments", "idx_module_list_order"))
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
|
||||||
if(!ModuleModel::getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2016. 1. 29: Add a column(declare_message) for report
|
// 2016. 1. 29: Add a column(declare_message) for report
|
||||||
if(!$oDB->isColumnExists("comment_declared_log","declare_message"))
|
if(!$oDB->isColumnExists("comment_declared_log","declare_message"))
|
||||||
{
|
{
|
||||||
|
|
@ -86,16 +53,6 @@ class Comment extends ModuleObject
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2018.01.24 Improve mass file deletion
|
|
||||||
if(!ModuleModel::getTrigger('document.moveDocumentModule', 'comment', 'controller', 'triggerMoveDocument', 'after'))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if(!ModuleModel::getTrigger('document.copyDocumentModule', 'comment', 'controller', 'triggerAddCopyDocument', 'add'))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,34 +63,11 @@ class Comment extends ModuleObject
|
||||||
function moduleUpdate()
|
function moduleUpdate()
|
||||||
{
|
{
|
||||||
$oDB = DB::getInstance();
|
$oDB = DB::getInstance();
|
||||||
$oModuleController = getController('module');
|
|
||||||
|
|
||||||
// 2007. 10. 17 add a trigger to delete comments together with posting deleted
|
|
||||||
if(!ModuleModel::getTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after');
|
|
||||||
}
|
|
||||||
// 2007. 10. 17 add a trigger to delete all of comments together with module deleted
|
|
||||||
if(!ModuleModel::getTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('module.deleteModule', 'comment', 'controller', 'triggerDeleteModuleComments', 'after');
|
|
||||||
}
|
|
||||||
// 2008. 02. 22 add comment setting when a new module added
|
|
||||||
if(!ModuleModel::getTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'comment', 'view', 'triggerDispCommentAdditionSetup', 'before');
|
|
||||||
}
|
|
||||||
if(!$oDB->isIndexExists("comments", "idx_module_list_order"))
|
if(!$oDB->isIndexExists("comments", "idx_module_list_order"))
|
||||||
{
|
{
|
||||||
$oDB->addIndex("comments", "idx_module_list_order", array("module_srl", "list_order"), TRUE);
|
$oDB->addIndex("comments", "idx_module_list_order", array("module_srl", "list_order"), TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
|
||||||
if(!ModuleModel::getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2016. 1. 29: Add a column(declare_message) for report
|
// 2016. 1. 29: Add a column(declare_message) for report
|
||||||
if(!$oDB->isColumnExists("comment_declared_log","declare_message"))
|
if(!$oDB->isColumnExists("comment_declared_log","declare_message"))
|
||||||
{
|
{
|
||||||
|
|
@ -150,27 +84,7 @@ class Comment extends ModuleObject
|
||||||
{
|
{
|
||||||
$oDB->addIndex('comments', 'idx_nick_name', array('nick_name'));
|
$oDB->addIndex('comments', 'idx_nick_name', array('nick_name'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2018.01.24 Improve mass file deletion
|
|
||||||
if(!ModuleModel::getTrigger('document.moveDocumentModule', 'comment', 'controller', 'triggerMoveDocument', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('document.moveDocumentModule', 'comment', 'controller', 'triggerMoveDocument', 'after');
|
|
||||||
}
|
|
||||||
if(!ModuleModel::getTrigger('document.copyDocumentModule', 'comment', 'controller', 'triggerAddCopyDocument', 'add'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('document.copyDocumentModule', 'comment', 'controller', 'triggerAddCopyDocument', 'add');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Regenerate cache file
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function recompileCache()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
/* End of file comment.class.php */
|
/* End of file comment.class.php */
|
||||||
/* Location: ./modules/comment/comment.class.php */
|
/* Location: ./modules/comment/comment.class.php */
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@
|
||||||
<grants />
|
<grants />
|
||||||
<actions>
|
<actions>
|
||||||
<action name="dispCommentDeclare" type="view" permission="member" />
|
<action name="dispCommentDeclare" type="view" permission="member" />
|
||||||
|
|
||||||
<action name="getCommentMenu" type="model" />
|
<action name="getCommentMenu" type="model" />
|
||||||
<action name="getCommentVotedMemberList" type="model" permission="root" />
|
<action name="getCommentVotedMemberList" type="model" permission="root" />
|
||||||
|
|
||||||
<action name="procCommentVoteUp" type="controller" />
|
<action name="procCommentVoteUp" type="controller" />
|
||||||
<action name="procCommentVoteUpCancel" type="controller" />
|
<action name="procCommentVoteUpCancel" type="controller" />
|
||||||
<action name="procCommentVoteDown" type="controller" />
|
<action name="procCommentVoteDown" type="controller" />
|
||||||
|
|
@ -15,11 +15,11 @@
|
||||||
<action name="procCommentDeclareCancel" type="controller" permission="member" />
|
<action name="procCommentDeclareCancel" type="controller" permission="member" />
|
||||||
<action name="procCommentGetList" type="controller" permission="manager" check_type="comment" check_var="comment_srls" />
|
<action name="procCommentGetList" type="controller" permission="manager" check_type="comment" check_var="comment_srls" />
|
||||||
<action name="procCommentInsertModuleConfig" type="controller" permission="manager" check_var="target_module_srl" ruleset="insertCommentModuleConfig" />
|
<action name="procCommentInsertModuleConfig" type="controller" permission="manager" check_var="target_module_srl" ruleset="insertCommentModuleConfig" />
|
||||||
|
|
||||||
<action name="dispCommentAdminList" type="view" admin_index="true" menu_name="comment" menu_index="true" />
|
<action name="dispCommentAdminList" type="view" admin_index="true" menu_name="comment" menu_index="true" />
|
||||||
<action name="dispCommentAdminDeclared" type="view" menu_name="comment" />
|
<action name="dispCommentAdminDeclared" type="view" menu_name="comment" />
|
||||||
<action name="dispCommentAdminDeclaredLogByCommentSrl" type="view" menu_name="comment" />
|
<action name="dispCommentAdminDeclaredLogByCommentSrl" type="view" menu_name="comment" />
|
||||||
|
|
||||||
<action name="procCommentAdminChangeStatus" type="controller"/>
|
<action name="procCommentAdminChangeStatus" type="controller"/>
|
||||||
<action name="procCommentAdminChangePublishedStatusChecked" type="controller" />
|
<action name="procCommentAdminChangePublishedStatusChecked" type="controller" />
|
||||||
<action name="procCommentAdminCancelDeclare" type="controller" />
|
<action name="procCommentAdminCancelDeclare" type="controller" />
|
||||||
|
|
@ -27,6 +27,14 @@
|
||||||
<action name="procCommentAdminDeleteChecked" type="controller" permission="manager" check_type="comment" check_var="cart" ruleset="deleteChecked" />
|
<action name="procCommentAdminDeleteChecked" type="controller" permission="manager" check_type="comment" check_var="cart" ruleset="deleteChecked" />
|
||||||
<action name="procCommentAdminMoveToTrash" type="controller" permission="manager" check_type="comment" check_var="comment_srl" />
|
<action name="procCommentAdminMoveToTrash" type="controller" permission="manager" check_type="comment" check_var="comment_srl" />
|
||||||
</actions>
|
</actions>
|
||||||
|
<eventHandlers>
|
||||||
|
<eventHandler after="document.deleteDocument" class="controller" method="triggerDeleteDocumentComments" />
|
||||||
|
<eventHandler after="module.deleteModule" class="controller" method="triggerDeleteModuleComments" />
|
||||||
|
<eventHandler after="module.procModuleAdminCopyModule" class="controller" method="triggerCopyModule" />
|
||||||
|
<eventHandler after="document.moveDocumentModule" class="controller" method="triggerMoveDocument" />
|
||||||
|
<eventHandler before="document.copyDocumentModule.each" class="controller" method="triggerAddCopyDocument" />
|
||||||
|
<eventHandler before="module.dispAdditionSetup" class="view" method="triggerDispCommentAdditionSetup" />
|
||||||
|
</eventHandlers>
|
||||||
<menus>
|
<menus>
|
||||||
<menu name="comment">
|
<menu name="comment">
|
||||||
<title xml:lang="en">Comment</title>
|
<title xml:lang="en">Comment</title>
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,13 @@
|
||||||
<action name="procDocumentAdminDeleteExtraVar" type="controller" permission="manager" check_var="module_srl" />
|
<action name="procDocumentAdminDeleteExtraVar" type="controller" permission="manager" check_var="module_srl" />
|
||||||
<action name="procDocumentAdminMoveExtraVar" type="controller" permission="manager" check_var="module_srl" />
|
<action name="procDocumentAdminMoveExtraVar" type="controller" permission="manager" check_var="module_srl" />
|
||||||
</actions>
|
</actions>
|
||||||
|
<eventHandlers>
|
||||||
|
<eventHandler after="module.deleteModule" class="controller" method="triggerDeleteModuleDocuments" />
|
||||||
|
<eventHandler after="module.procModuleAdminCopyModule" class="controller" method="triggerCopyModuleExtraKeys" />
|
||||||
|
<eventHandler after="module.procModuleAdminCopyModule" class="controller" method="triggerCopyModule" />
|
||||||
|
<eventHandler after="file.deleteFile" class="controller" method="triggerAfterDeleteFile" />
|
||||||
|
<eventHandler before="module.dispAdditionSetup" class="view" method="triggerDispDocumentAdditionSetup" />
|
||||||
|
</eventHandlers>
|
||||||
<menus>
|
<menus>
|
||||||
<menu name="document">
|
<menu name="document">
|
||||||
<title xml:lang="en">Document</title>
|
<title xml:lang="en">Document</title>
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,7 @@ class Document extends ModuleObject
|
||||||
*/
|
*/
|
||||||
function moduleInstall()
|
function moduleInstall()
|
||||||
{
|
{
|
||||||
// Register action forward (to use in administrator mode)
|
$oDB = DB::getInstance();
|
||||||
$oModuleController = getController('module');
|
|
||||||
|
|
||||||
$oDB = &DB::getInstance();
|
|
||||||
$oDB->addIndex("documents","idx_module_list_order", array("module_srl","list_order"));
|
$oDB->addIndex("documents","idx_module_list_order", array("module_srl","list_order"));
|
||||||
$oDB->addIndex("documents","idx_module_update_order", array("module_srl","update_order"));
|
$oDB->addIndex("documents","idx_module_update_order", array("module_srl","update_order"));
|
||||||
$oDB->addIndex("documents","idx_module_readed_count", array("module_srl","readed_count"));
|
$oDB->addIndex("documents","idx_module_readed_count", array("module_srl","readed_count"));
|
||||||
|
|
@ -60,11 +57,6 @@ class Document extends ModuleObject
|
||||||
$oDB->addIndex("documents","idx_module_blamed_count", array("module_srl","blamed_count"));
|
$oDB->addIndex("documents","idx_module_blamed_count", array("module_srl","blamed_count"));
|
||||||
$oDB->addIndex("document_aliases", "idx_module_title", array("module_srl","alias_title"), true);
|
$oDB->addIndex("document_aliases", "idx_module_title", array("module_srl","alias_title"), true);
|
||||||
$oDB->addIndex("document_extra_vars", "unique_extra_vars", array("module_srl","document_srl","var_idx","lang_code"), true);
|
$oDB->addIndex("document_extra_vars", "unique_extra_vars", array("module_srl","document_srl","var_idx","lang_code"), true);
|
||||||
// 2007. 10. 17 Add a trigger to delete all posts together when the module is deleted
|
|
||||||
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
|
|
||||||
|
|
||||||
// 2009. 01. 29 Added a trigger for additional setup
|
|
||||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -82,9 +74,6 @@ class Document extends ModuleObject
|
||||||
if(!$oDB->isIndexExists("documents","idx_module_voted_count")) return true;
|
if(!$oDB->isIndexExists("documents","idx_module_voted_count")) return true;
|
||||||
if(!$oDB->isIndexExists("documents","idx_module_regdate")) return true;
|
if(!$oDB->isIndexExists("documents","idx_module_regdate")) return true;
|
||||||
|
|
||||||
// 2007. 10. 17 Add a trigger to delete all posts together when the module is deleted
|
|
||||||
if(!ModuleModel::getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after')) return true;
|
|
||||||
|
|
||||||
// 2007. 11. 20 create a composite index on the columns(module_srl + is_notice)
|
// 2007. 11. 20 create a composite index on the columns(module_srl + is_notice)
|
||||||
if(!$oDB->isIndexExists("documents","idx_module_notice")) return true;
|
if(!$oDB->isIndexExists("documents","idx_module_notice")) return true;
|
||||||
|
|
||||||
|
|
@ -94,9 +83,6 @@ class Document extends ModuleObject
|
||||||
// 2008. 04. 23 Add a column(blamed_count)
|
// 2008. 04. 23 Add a column(blamed_count)
|
||||||
if(!$oDB->isIndexExists("documents","idx_module_blamed_count")) return true;
|
if(!$oDB->isIndexExists("documents","idx_module_blamed_count")) return true;
|
||||||
|
|
||||||
// 2009. 01. 29 Added a trigger for additional setup
|
|
||||||
if(!ModuleModel::getTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before')) return true;
|
|
||||||
|
|
||||||
// 2009. 03. 11 check the index in the document_extra_vars table
|
// 2009. 03. 11 check the index in the document_extra_vars table
|
||||||
if(!$oDB->isIndexExists("document_extra_vars", "unique_extra_vars")) return true;
|
if(!$oDB->isIndexExists("document_extra_vars", "unique_extra_vars")) return true;
|
||||||
if($oDB->isIndexExists("document_extra_vars", "unique_module_vars")) return true;
|
if($oDB->isIndexExists("document_extra_vars", "unique_module_vars")) return true;
|
||||||
|
|
@ -107,12 +93,6 @@ class Document extends ModuleObject
|
||||||
// 2011. 10. 25 status index check
|
// 2011. 10. 25 status index check
|
||||||
if(!$oDB->isIndexExists("documents", "idx_module_status")) return true;
|
if(!$oDB->isIndexExists("documents", "idx_module_status")) return true;
|
||||||
|
|
||||||
// 2012. 02. 27 Add a trigger to copy extra keys when the module is copied
|
|
||||||
if(!ModuleModel::getTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModuleExtraKeys', 'after')) return true;
|
|
||||||
|
|
||||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
|
||||||
if(!ModuleModel::getTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModule', 'after')) return true;
|
|
||||||
|
|
||||||
// 2016. 1. 27: Add a column(declare_message) for report
|
// 2016. 1. 27: Add a column(declare_message) for report
|
||||||
if(!$oDB->isColumnExists("document_declared_log","declare_message")) return true;
|
if(!$oDB->isColumnExists("document_declared_log","declare_message")) return true;
|
||||||
|
|
||||||
|
|
@ -125,9 +105,6 @@ class Document extends ModuleObject
|
||||||
// 2017.12.21 Add an index for nick_name
|
// 2017.12.21 Add an index for nick_name
|
||||||
if(!$oDB->isIndexExists('documents', 'idx_nick_name')) return true;
|
if(!$oDB->isIndexExists('documents', 'idx_nick_name')) return true;
|
||||||
|
|
||||||
// 2018.01.24 Improve mass file deletion
|
|
||||||
if(!ModuleModel::getTrigger('file.deleteFile', 'document', 'controller', 'triggerAfterDeleteFile', 'after')) return true;
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -138,7 +115,6 @@ class Document extends ModuleObject
|
||||||
function moduleUpdate()
|
function moduleUpdate()
|
||||||
{
|
{
|
||||||
$oDB = DB::getInstance();
|
$oDB = DB::getInstance();
|
||||||
$oModuleController = getController('module');
|
|
||||||
|
|
||||||
// 2007. 8. 23: create a clustered index in the document table
|
// 2007. 8. 23: create a clustered index in the document table
|
||||||
if(!$oDB->isIndexExists("documents","idx_module_list_order"))
|
if(!$oDB->isIndexExists("documents","idx_module_list_order"))
|
||||||
|
|
@ -166,12 +142,6 @@ class Document extends ModuleObject
|
||||||
$oDB->addIndex("documents","idx_module_regdate", array("module_srl","regdate"));
|
$oDB->addIndex("documents","idx_module_regdate", array("module_srl","regdate"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2007. 10. 17 Add a trigger to delete all posts together when the module is deleted
|
|
||||||
if(!ModuleModel::getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2007. 11. 20 create a composite index on the columns(module_srl + is_notice)
|
// 2007. 11. 20 create a composite index on the columns(module_srl + is_notice)
|
||||||
if(!$oDB->isIndexExists("documents","idx_module_notice"))
|
if(!$oDB->isIndexExists("documents","idx_module_notice"))
|
||||||
{
|
{
|
||||||
|
|
@ -190,12 +160,6 @@ class Document extends ModuleObject
|
||||||
$oDB->addIndex('documents', 'idx_module_blamed_count', array('module_srl', 'blamed_count'));
|
$oDB->addIndex('documents', 'idx_module_blamed_count', array('module_srl', 'blamed_count'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2009. 01. 29 Added a trigger for additional setup
|
|
||||||
if(!ModuleModel::getTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2009. 03. 11 Check the index in the document_extra_vars table
|
// 2009. 03. 11 Check the index in the document_extra_vars table
|
||||||
if(!$oDB->isIndexExists("document_extra_vars", "unique_extra_vars"))
|
if(!$oDB->isIndexExists("document_extra_vars", "unique_extra_vars"))
|
||||||
{
|
{
|
||||||
|
|
@ -217,18 +181,6 @@ class Document extends ModuleObject
|
||||||
$oDB->addIndex("documents", "idx_module_status", array("module_srl","status"));
|
$oDB->addIndex("documents", "idx_module_status", array("module_srl","status"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2012. 02. 27 Add a trigger to copy extra keys when the module is copied
|
|
||||||
if(!ModuleModel::getTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModuleExtraKeys', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModuleExtraKeys', 'after');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
|
||||||
if(!ModuleModel::getTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModule', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'document', 'controller', 'triggerCopyModule', 'after');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2016. 1. 27: Add a column(declare_message) for report
|
// 2016. 1. 27: Add a column(declare_message) for report
|
||||||
if(!$oDB->isColumnExists("document_declared_log","declare_message"))
|
if(!$oDB->isColumnExists("document_declared_log","declare_message"))
|
||||||
{
|
{
|
||||||
|
|
@ -253,20 +205,6 @@ class Document extends ModuleObject
|
||||||
{
|
{
|
||||||
$oDB->addIndex('documents', 'idx_nick_name', array('nick_name'));
|
$oDB->addIndex('documents', 'idx_nick_name', array('nick_name'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2018.01.24 Improve mass file deletion
|
|
||||||
if(!ModuleModel::getTrigger('file.deleteFile', 'document', 'controller', 'triggerAfterDeleteFile', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('file.deleteFile', 'document', 'controller', 'triggerAfterDeleteFile', 'after');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Re-generate the cache file
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function recompileCache()
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,13 @@
|
||||||
<action name="procEditorAdminCheckUseListOrder" type="controller" ruleset="componentOrderAndUse" />
|
<action name="procEditorAdminCheckUseListOrder" type="controller" ruleset="componentOrderAndUse" />
|
||||||
<action name="procEditorAdminSetupComponent" type="controller" ruleset="setupComponent" />
|
<action name="procEditorAdminSetupComponent" type="controller" ruleset="setupComponent" />
|
||||||
</actions>
|
</actions>
|
||||||
|
<eventHandlers>
|
||||||
|
<eventHandler after="document.insertDocument" class="controller" method="triggerDeleteSavedDoc" />
|
||||||
|
<eventHandler after="document.updateDocument" class="controller" method="triggerDeleteSavedDoc" />
|
||||||
|
<eventHandler after="module.procModuleAdminCopyModule" class="controller" method="triggerCopyModule" />
|
||||||
|
<eventHandler before="module.dispAdditionSetup" class="view" method="triggerDispEditorAdditionSetup" />
|
||||||
|
<eventHandler before="display" class="controller" method="triggerEditorComponentCompile" />
|
||||||
|
</eventHandlers>
|
||||||
<menus>
|
<menus>
|
||||||
<menu name="editor">
|
<menu name="editor">
|
||||||
<title xml:lang="en">WYSIWYG Editor</title>
|
<title xml:lang="en">WYSIWYG Editor</title>
|
||||||
|
|
|
||||||
|
|
@ -65,23 +65,15 @@ class editor extends ModuleObject
|
||||||
*/
|
*/
|
||||||
function moduleInstall()
|
function moduleInstall()
|
||||||
{
|
{
|
||||||
// Register action forward (to use in administrator mode)
|
|
||||||
$oModuleController = getController('module');
|
|
||||||
// Add the default editor component
|
// Add the default editor component
|
||||||
$oEditorController = getAdminController('editor');
|
$oEditorController = getAdminController('editor');
|
||||||
$oEditorController->insertComponent('emoticon', false);
|
$oEditorController->insertComponent('emoticon', false);
|
||||||
$oEditorController->insertComponent('image_link', false);
|
$oEditorController->insertComponent('image_link', false);
|
||||||
$oEditorController->insertComponent('image_gallery', false);
|
$oEditorController->insertComponent('image_gallery', false);
|
||||||
$oEditorController->insertComponent('poll_maker', true);
|
$oEditorController->insertComponent('poll_maker', true);
|
||||||
|
|
||||||
// Create a directory to use in the editor module
|
// Create a directory to use in the editor module
|
||||||
FileHandler::makeDir('./files/cache/editor');
|
FileHandler::makeDir('./files/cache/editor');
|
||||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
|
||||||
$oModuleController->insertTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
|
||||||
$oModuleController->insertTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
|
||||||
// 2007. 10. 23 Add an editor trigger on the module addition setup
|
|
||||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before');
|
|
||||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
|
||||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -95,19 +87,6 @@ class editor extends ModuleObject
|
||||||
if(!$oDB->isColumnExists('editor_autosave', 'certify_key')) return true;
|
if(!$oDB->isColumnExists('editor_autosave', 'certify_key')) return true;
|
||||||
if(!$oDB->isIndexExists('editor_autosave', 'idx_certify_key')) return true;
|
if(!$oDB->isIndexExists('editor_autosave', 'idx_certify_key')) return true;
|
||||||
|
|
||||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
|
||||||
if(!ModuleModel::getTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after')) return true;
|
|
||||||
if(!ModuleModel::getTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after')) return true;
|
|
||||||
// 2007. 10. 23 Add an editor trigger on the module addition setup
|
|
||||||
if(!ModuleModel::getTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before')) return true;
|
|
||||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
|
||||||
if(!ModuleModel::getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before')) return true;
|
|
||||||
// 2009. 06. 19 Remove unused trigger
|
|
||||||
if(ModuleModel::getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before')) return true;
|
|
||||||
|
|
||||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
|
||||||
if(!ModuleModel::getTrigger('module.procModuleAdminCopyModule', 'editor', 'controller', 'triggerCopyModule', 'after')) return true;
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -128,34 +107,6 @@ class editor extends ModuleObject
|
||||||
{
|
{
|
||||||
$oDB->addIndex('editor_autosave', 'idx_certify_key', 'certify_key');
|
$oDB->addIndex('editor_autosave', 'idx_certify_key', 'certify_key');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
|
||||||
if(!ModuleModel::getTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after'))
|
|
||||||
$oModuleController->insertTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
|
||||||
if(!ModuleModel::getTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after'))
|
|
||||||
$oModuleController->insertTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
|
||||||
// 2007. 10. Add an editor trigger on the module addition setup
|
|
||||||
if(!ModuleModel::getTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before'))
|
|
||||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before');
|
|
||||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
|
||||||
if(!ModuleModel::getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before'))
|
|
||||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
|
||||||
// 2009. 06. 19 Remove unused trigger
|
|
||||||
if(ModuleModel::getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before'))
|
|
||||||
$oModuleController->deleteTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before');
|
|
||||||
|
|
||||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
|
||||||
if(!ModuleModel::getTrigger('module.procModuleAdminCopyModule', 'editor', 'controller', 'triggerCopyModule', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'editor', 'controller', 'triggerCopyModule', 'after');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Re-generate the cache file
|
|
||||||
*/
|
|
||||||
function recompileCache()
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* End of file editor.class.php */
|
/* End of file editor.class.php */
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<grants />
|
<grants />
|
||||||
<actions>
|
<actions>
|
||||||
<action name="getFileList" type="model" />
|
<action name="getFileList" type="model" />
|
||||||
|
|
||||||
<action name="procFileUpload" type="controller" check_csrf="false" />
|
<action name="procFileUpload" type="controller" check_csrf="false" />
|
||||||
<action name="procFileIframeUpload" type="controller" />
|
<action name="procFileIframeUpload" type="controller" />
|
||||||
<action name="procFileImageResize" type="controller" ruleset="imageResize" />
|
<action name="procFileImageResize" type="controller" ruleset="imageResize" />
|
||||||
|
|
@ -12,12 +12,12 @@
|
||||||
<action name="procFileDownload" type="controller" method="GET|POST" />
|
<action name="procFileDownload" type="controller" method="GET|POST" />
|
||||||
<action name="procFileOutput" type="controller" method="GET|POST" />
|
<action name="procFileOutput" type="controller" method="GET|POST" />
|
||||||
<action name="procFileGetList" type="controller" permission="root" />
|
<action name="procFileGetList" type="controller" permission="root" />
|
||||||
|
|
||||||
<action name="dispFileAdminList" type="view" admin_index="true" menu_name="file" menu_index="true" />
|
<action name="dispFileAdminList" type="view" admin_index="true" menu_name="file" menu_index="true" />
|
||||||
<action name="dispFileAdminUploadConfig" type="view" menu_name="file" />
|
<action name="dispFileAdminUploadConfig" type="view" menu_name="file" />
|
||||||
<action name="dispFileAdminDownloadConfig" type="view" menu_name="file" />
|
<action name="dispFileAdminDownloadConfig" type="view" menu_name="file" />
|
||||||
<action name="dispFileAdminOtherConfig" type="view" menu_name="file" />
|
<action name="dispFileAdminOtherConfig" type="view" menu_name="file" />
|
||||||
|
|
||||||
<action name="procFileAdminAddCart" type="controller" />
|
<action name="procFileAdminAddCart" type="controller" />
|
||||||
<action name="procFileAdminDeleteChecked" type="controller" ruleset="deleteChecked" />
|
<action name="procFileAdminDeleteChecked" type="controller" ruleset="deleteChecked" />
|
||||||
<action name="procFileAdminInsertUploadConfig" type="controller" ruleset="insertConfig" />
|
<action name="procFileAdminInsertUploadConfig" type="controller" ruleset="insertConfig" />
|
||||||
|
|
@ -25,6 +25,17 @@
|
||||||
<action name="procFileAdminInsertOtherConfig" type="controller" />
|
<action name="procFileAdminInsertOtherConfig" type="controller" />
|
||||||
<action name="procFileAdminInsertModuleConfig" type="controller" permission="manager" check_var="target_module_srl" ruleset="fileModuleConfig" />
|
<action name="procFileAdminInsertModuleConfig" type="controller" permission="manager" check_var="target_module_srl" ruleset="fileModuleConfig" />
|
||||||
</actions>
|
</actions>
|
||||||
|
<eventHandlers>
|
||||||
|
<eventHandler after="document.deleteDocument" class="controller" method="triggerDeleteAttached" />
|
||||||
|
<eventHandler after="comment.deleteComment" class="controller" method="triggerCommentDeleteAttached" />
|
||||||
|
<eventHandler after="editor.deleteSavedDoc" class="controller" method="triggerDeleteAttached" />
|
||||||
|
<eventHandler after="module.deleteModule" class="controller" method="triggerDeleteModuleFiles" />
|
||||||
|
<eventHandler after="module.procModuleAdminCopyModule" class="controller" method="triggerCopyModule" />
|
||||||
|
<eventHandler after="document.moveDocumentModule" class="controller" method="triggerMoveDocument" />
|
||||||
|
<eventHandler before="document.copyDocumentModule.each" class="controller" method="triggerAddCopyDocument" />
|
||||||
|
<eventHandler before="comment.copyCommentByDocument.each" class="controller" method="triggerAddCopyCommentByDocument" />
|
||||||
|
<eventHandler before="module.dispAdditionSetup" class="view" method="triggerDispFileAdditionSetup" />
|
||||||
|
</eventHandlers>
|
||||||
<menus>
|
<menus>
|
||||||
<menu name="file">
|
<menu name="file">
|
||||||
<title xml:lang="en">File</title>
|
<title xml:lang="en">File</title>
|
||||||
|
|
|
||||||
|
|
@ -13,22 +13,9 @@ class File extends ModuleObject
|
||||||
*/
|
*/
|
||||||
function moduleInstall()
|
function moduleInstall()
|
||||||
{
|
{
|
||||||
// Register action forward (to use in administrator mode)
|
|
||||||
$oModuleController = getController('module');
|
|
||||||
|
|
||||||
// Generate a directory for the file module
|
// Generate a directory for the file module
|
||||||
FileHandler::makeDir('./files/attach/images');
|
FileHandler::makeDir('./files/attach/images');
|
||||||
FileHandler::makeDir('./files/attach/binaries');
|
FileHandler::makeDir('./files/attach/binaries');
|
||||||
|
|
||||||
// 2007. 10. 17 Create a trigger to insert, update, delete documents and comments
|
|
||||||
$oModuleController->insertTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
|
||||||
$oModuleController->insertTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after');
|
|
||||||
// 2009. 6. 9 Delete all the attachements when auto-saved document is deleted
|
|
||||||
$oModuleController->insertTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
|
||||||
// 2007. 10. 17 Create a trigger to delete all the attachements when the module is deleted
|
|
||||||
$oModuleController->insertTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after');
|
|
||||||
// 2007. 10. 19 Call a trigger to set up the file permissions before displaying
|
|
||||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -39,43 +26,6 @@ class File extends ModuleObject
|
||||||
function checkUpdate()
|
function checkUpdate()
|
||||||
{
|
{
|
||||||
$oDB = DB::getInstance();
|
$oDB = DB::getInstance();
|
||||||
$oModuleModel = getModel('module');
|
|
||||||
|
|
||||||
if($oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before')) return true;
|
|
||||||
if($oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after')) return true;
|
|
||||||
if($oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before')) return true;
|
|
||||||
if($oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after')) return true;
|
|
||||||
|
|
||||||
if($oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before')) return true;
|
|
||||||
if($oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after')) return true;
|
|
||||||
if($oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before')) return true;
|
|
||||||
if($oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after')) return true;
|
|
||||||
|
|
||||||
// 2007. 10. 17 Create a trigger to insert, update, delete documents and comments
|
|
||||||
if(!$oModuleModel->getTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after')) return true;
|
|
||||||
if(!$oModuleModel->getTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after')) return true;
|
|
||||||
// 2009. 6. 9 Delete all the attachements when auto-saved document is deleted
|
|
||||||
if(!$oModuleModel->getTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after')) return true;
|
|
||||||
// 2007. 10. 17 Create a trigger to delete all the attachements when the module is deleted
|
|
||||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after')) return true;
|
|
||||||
// 2007. 10. 19 Call a trigger to set up the file permissions before displaying
|
|
||||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before')) return true;
|
|
||||||
|
|
||||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
|
||||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'file', 'controller', 'triggerCopyModule', 'after')) return true;
|
|
||||||
|
|
||||||
if(!$oModuleModel->getTrigger('document.moveDocumentModule', 'file', 'controller', 'triggerMoveDocument', 'after'))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if(!$oModuleModel->getTrigger('document.copyDocumentModule', 'file', 'controller', 'triggerAddCopyDocument', 'add'))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if(!$oModuleModel->getTrigger('comment.copyCommentByDocument', 'file', 'controller', 'triggerAddCopyCommentByDocument', 'add'))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check columns
|
// Check columns
|
||||||
if(!$oDB->isColumnExists('files', 'upload_target_type'))
|
if(!$oDB->isColumnExists('files', 'upload_target_type'))
|
||||||
|
|
@ -149,81 +99,6 @@ class File extends ModuleObject
|
||||||
function moduleUpdate()
|
function moduleUpdate()
|
||||||
{
|
{
|
||||||
$oDB = DB::getInstance();
|
$oDB = DB::getInstance();
|
||||||
$oModuleModel = getModel('module');
|
|
||||||
$oModuleController = getController('module');
|
|
||||||
|
|
||||||
if($oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before'))
|
|
||||||
{
|
|
||||||
$oModuleController->deleteTrigger('document.insertDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($oModuleModel->getTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->deleteTrigger('document.insertDocument', 'file', 'controller', 'triggerAttachFiles', 'after');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before'))
|
|
||||||
{
|
|
||||||
$oModuleController->deleteTrigger('document.updateDocument', 'file', 'controller', 'triggerCheckAttached', 'before');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($oModuleModel->getTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->deleteTrigger('document.updateDocument', 'file', 'controller', 'triggerAttachFiles', 'after');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before'))
|
|
||||||
{
|
|
||||||
$oModuleController->deleteTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($oModuleModel->getTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->deleteTrigger('comment.insertComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before'))
|
|
||||||
{
|
|
||||||
$oModuleController->deleteTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentCheckAttached', 'before');
|
|
||||||
}
|
|
||||||
|
|
||||||
if($oModuleModel->getTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->deleteTrigger('comment.updateComment', 'file', 'controller', 'triggerCommentAttachFiles', 'after');
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2007. 10. 17 Create a trigger to insert, update, delete documents and comments
|
|
||||||
if(!$oModuleModel->getTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after'))
|
|
||||||
$oModuleController->insertTrigger('document.deleteDocument', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
|
||||||
|
|
||||||
if(!$oModuleModel->getTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after'))
|
|
||||||
$oModuleController->insertTrigger('comment.deleteComment', 'file', 'controller', 'triggerCommentDeleteAttached', 'after');
|
|
||||||
// 2009. 6. 9 Delete all the attachements when auto-saved document is deleted
|
|
||||||
if(!$oModuleModel->getTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after'))
|
|
||||||
$oModuleController->insertTrigger('editor.deleteSavedDoc', 'file', 'controller', 'triggerDeleteAttached', 'after');
|
|
||||||
// 2007. 10. 17 Create a trigger to delete all the attachements when the module is deleted
|
|
||||||
if(!$oModuleModel->getTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after'))
|
|
||||||
$oModuleController->insertTrigger('module.deleteModule', 'file', 'controller', 'triggerDeleteModuleFiles', 'after');
|
|
||||||
// 2007. 10. 19 Call a trigger to set up the file permissions before displaying
|
|
||||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before'))
|
|
||||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'file', 'view', 'triggerDispFileAdditionSetup', 'before');
|
|
||||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
|
||||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'file', 'controller', 'triggerCopyModule', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'file', 'controller', 'triggerCopyModule', 'after');
|
|
||||||
}
|
|
||||||
if(!$oModuleModel->getTrigger('document.moveDocumentModule', 'file', 'controller', 'triggerMoveDocument', 'after'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('document.moveDocumentModule', 'file', 'controller', 'triggerMoveDocument', 'after');
|
|
||||||
}
|
|
||||||
if(!$oModuleModel->getTrigger('document.copyDocumentModule', 'file', 'controller', 'triggerAddCopyDocument', 'add'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('document.copyDocumentModule', 'file', 'controller', 'triggerAddCopyDocument', 'add');
|
|
||||||
}
|
|
||||||
if(!$oModuleModel->getTrigger('comment.copyCommentByDocument', 'file', 'controller', 'triggerAddCopyCommentByDocument', 'add'))
|
|
||||||
{
|
|
||||||
$oModuleController->insertTrigger('comment.copyCommentByDocument', 'file', 'controller', 'triggerAddCopyCommentByDocument', 'add');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check columns
|
// Check columns
|
||||||
if(!$oDB->isColumnExists('files', 'upload_target_type'))
|
if(!$oDB->isColumnExists('files', 'upload_target_type'))
|
||||||
|
|
@ -289,15 +164,6 @@ class File extends ModuleObject
|
||||||
$oDB->dropIndex('files', 'idx_list_order');
|
$oDB->dropIndex('files', 'idx_list_order');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Re-generate the cache file
|
|
||||||
*
|
|
||||||
* @return Object
|
|
||||||
*/
|
|
||||||
function recompileCache()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/* End of file file.class.php */
|
/* End of file file.class.php */
|
||||||
/* Location: ./modules/file/file.class.php */
|
/* Location: ./modules/file/file.class.php */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue