mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 05:42:13 +09:00
#19435955: 진행중(질의 오류 수정, 실행 코드 추가), 동작 검증 필요.
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8020 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f4373b04c4
commit
247f88eeb8
5 changed files with 77 additions and 4 deletions
|
|
@ -27,10 +27,61 @@
|
|||
CUBRID를 사용하지 않는 경우에만 보편적인 기존 질의문을 사용합니다. */
|
||||
$db_info = Context::getDBInfo ();
|
||||
if ($db_info->db_type != "cubrid") {
|
||||
debugPrint ("importer: DEBUG - Non CUBRID DBMS detected.");
|
||||
$output = executeQuery('importer.updateDocumentSync');
|
||||
$output = executeQuery('importer.updateCommentSync');
|
||||
}
|
||||
else {
|
||||
debugPrint ("importer: DEBUG - CUBRID DBMS detected.");
|
||||
$output = executeQueryArray ('importer.getDocumentMemberSrlWithUserID');
|
||||
if (is_array ($output) && count ($output)) {
|
||||
debugPrint ("importer: DEBUG - collect userid-membersrl pair for documents success.");
|
||||
$success_count = 0;
|
||||
$error_count = 0;
|
||||
$total_count = 0;
|
||||
foreach ($output as $val) {
|
||||
$args->user_id = $val->user_id;
|
||||
$args->member_srl = $val->member_srl;
|
||||
$tmp = executeQuery ('importer.updateDocumentSyncForCUBRID', $args);
|
||||
if ($tmp->toBool () === true) {
|
||||
$success_count++;
|
||||
}
|
||||
else {
|
||||
$error_count++;
|
||||
}
|
||||
$total_count++;
|
||||
}
|
||||
debugPrint ("importer: Statistics of change owner for documents.\n".
|
||||
sprintf ("Total: %d, Success: %d, Error: %d.",
|
||||
$total_count, $success_count, $error_count
|
||||
)
|
||||
);
|
||||
} // documents section
|
||||
|
||||
$output = executeQueryArray ('importer.getCommentMemberSrlWithUserID');
|
||||
if (is_array ($output) && count ($output)) {
|
||||
debugPrint ("importer: DEBUG - collect userid-membersrl pair for comments success.");
|
||||
$success_count = 0;
|
||||
$error_count = 0;
|
||||
$total_count = 0;
|
||||
foreach ($output as $val) {
|
||||
$args->user_id = $val->user_id;
|
||||
$args->member_srl = $val->member_srl;
|
||||
$tmp = executeQuery ('importer.updateCommentSyncForCUBRID', $args);
|
||||
if ($tmp->toBool () === true) {
|
||||
$success_count++;
|
||||
}
|
||||
else {
|
||||
$error_count++;
|
||||
}
|
||||
$total_count++;
|
||||
}
|
||||
debugPrint ("importer: Statistics of change owner for documents.\n".
|
||||
sprintf ("Total: %d, Success: %d, Error: %d.",
|
||||
$total_count, $success_count, $error_count
|
||||
)
|
||||
);
|
||||
} // comments section
|
||||
}
|
||||
|
||||
$this->setMessage('msg_sync_completed');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue