mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 07:39:55 +09:00
Merged revision(s) 10027 from branches/1.5.0/modules/comment/comment.class.php:
Added UNIQUE INDEX idx_module_list_order ON xe_comments(module_srl, list_order) to support textyle pages for large databases. ........ git-svn-id: http://xe-core.googlecode.com/svn/trunk@10028 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e4516a58b7
commit
b1e163c51d
1 changed files with 23 additions and 0 deletions
|
|
@ -13,8 +13,19 @@
|
||||||
* @brief implemented if additional tasks are required when installing
|
* @brief implemented if additional tasks are required when installing
|
||||||
**/
|
**/
|
||||||
function moduleInstall() {
|
function moduleInstall() {
|
||||||
|
$oDB = &DB::getInstance();
|
||||||
|
|
||||||
// register the action forward (for using on the admin mode)
|
// register the action forward (for using on the admin mode)
|
||||||
$oModuleController = &getController('module');
|
$oModuleController = &getController('module');
|
||||||
|
|
||||||
|
$oDB->addIndex
|
||||||
|
(
|
||||||
|
"comments",
|
||||||
|
"idx_module_list_order",
|
||||||
|
array("module_srl", "list_order"),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
// 2007. 10. 17 add a trigger to delete comments together with posting deleted
|
// 2007. 10. 17 add a trigger to delete comments together with posting deleted
|
||||||
$oModuleController->insertTrigger('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
|
// 2007. 10. 17 add a trigger to delete all of comments together with module deleted
|
||||||
|
|
@ -44,6 +55,9 @@
|
||||||
if(!$oDB->isColumnExists("comments", "blamed_count")) return true;
|
if(!$oDB->isColumnExists("comments", "blamed_count")) return true;
|
||||||
if(!$oDB->isColumnExists("comment_voted_log", "point")) return true;
|
if(!$oDB->isColumnExists("comment_voted_log", "point")) return true;
|
||||||
|
|
||||||
|
if (!$oDB->isIndexExists("comments", "idx_module_list_order"))
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,6 +94,15 @@
|
||||||
if(!$oDB->isColumnExists("comment_voted_log", "point"))
|
if(!$oDB->isColumnExists("comment_voted_log", "point"))
|
||||||
$oDB->addColumn('comment_voted_log', 'point', 'number', 11, 0, true);
|
$oDB->addColumn('comment_voted_log', 'point', 'number', 11, 0, true);
|
||||||
|
|
||||||
|
if (!$oDB->isIndexExists("comments", "idx_module_list_order"))
|
||||||
|
$oDB->addIndex
|
||||||
|
(
|
||||||
|
"comments",
|
||||||
|
"idx_module_list_order",
|
||||||
|
array("module_srl", "list_order"),
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
return new Object(0, 'success_updated');
|
return new Object(0, 'success_updated');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue