r7434 fix

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7438 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2010-05-11 10:20:27 +00:00
parent 96c71e8c9e
commit fe09e55c51
12 changed files with 187 additions and 44 deletions

View file

@ -409,6 +409,7 @@
* @brief 문서 삭제
**/
function deleteDocument($document_srl, $is_admin = false) {
// trigger 호출 (before)
$trigger_obj->document_srl = $document_srl;
$output = ModuleHandler::triggerCall('document.deleteDocument', 'before', $trigger_obj);
@ -465,6 +466,7 @@
// commit
$oDB->commit();
return $output;
}
@ -472,6 +474,7 @@
* @brief 문서를 휴지통으로 옮김
**/
function moveDocumentToTrash($obj) {
// 주어진 trash_srl이 없으면 trash_srl 등록
if(!$obj->trash_srl) $trash_args->trash_srl = getNextSequence();
else $trash_args->trash_srl = $obj->trash_srl;
@ -565,7 +568,13 @@
// 조회수 업데이트
$args->document_srl = $document_srl;
$output = executeQuery('document.updateReadedCount', $args);
$output = executeQuery('document.updateReadedCount', $args, false);
$CacheHandler = &CacheHandler::getInstance();
if($CacheHandler->isSupport()){
$readed_count = $oDocument->get('readed_count')+1;
$oDocument->add('readed_count', $readed_count);
$CacheHandler->put('readed_count:'.$document_srl, $readed_count);
}
// 세션 등록
$_SESSION['readed_document'][$document_srl] = true;