mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
issue 27 comment status refactoring
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8460 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
23453c0aac
commit
e56c8ee2a1
12 changed files with 106 additions and 25 deletions
|
|
@ -106,6 +106,9 @@
|
|||
//2011. 05. 23 adding status column to document
|
||||
if(!$oDB->isColumnExists('documents', 'status')) return true;
|
||||
|
||||
//2011. 06. 07 check comment status update
|
||||
if($oDB->isColumnExists('documents', 'allow_comment') || $oDB->isColumnExists('documents', 'lock_comment')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -251,8 +254,42 @@
|
|||
$oDB->dropColumn('documents', 'is_secret');
|
||||
}
|
||||
|
||||
return new Object(0,'success_updated');
|
||||
//2011. 06. 07 merge column, allow_comment and lock_comment
|
||||
if($oDB->isColumnExists('documents', 'allow_comment') || $oDB->isColumnExists('documents', 'lock_comment'))
|
||||
{
|
||||
$oDB->addColumn('documents', 'comment_status', 'varchar', 20, 'ALLOW');
|
||||
$columnList = array('module_srl');
|
||||
$moduleSrlList = $oModuleModel->getModuleSrlList(null, $columnList);
|
||||
|
||||
$args->commentStatus = 'DENY';
|
||||
$isSuccessUpdated = true;
|
||||
|
||||
// allow_comment='Y', lock_comment='Y'
|
||||
$args->allowComment = 'Y';
|
||||
$args->lockComment = 'Y';
|
||||
$output = executeQuery('document.updateDocumentCommentStatus', $args);
|
||||
if(!$output->toBool()) $isSuccessUpdated = false;
|
||||
|
||||
// allow_comment='N', lock_comment='Y'
|
||||
$args->allowComment = 'N';
|
||||
$args->lockComment = 'Y';
|
||||
$output = executeQuery('document.updateDocumentCommentStatus', $args);
|
||||
if(!$output->toBool()) $isSuccessUpdated = false;
|
||||
|
||||
// allow_comment='N', lock_comment='N'
|
||||
$args->allowComment = 'N';
|
||||
$args->lockComment = 'N';
|
||||
$output = executeQuery('document.updateDocumentCommentStatus', $args);
|
||||
if(!$output->toBool()) $isSuccessUpdated = false;
|
||||
|
||||
if($isSuccessUpdated)
|
||||
{
|
||||
$oDB->dropColumn('documents', 'allow_comment');
|
||||
$oDB->dropColumn('documents', 'lock_comment');
|
||||
}
|
||||
}
|
||||
|
||||
return new Object(0,'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -278,7 +315,7 @@
|
|||
|
||||
function getConfigStatus($key)
|
||||
{
|
||||
if(array_key_exists($key, $this->statusList)) return $this->statusList[$key];
|
||||
if(array_key_exists(strtolower($key), $this->statusList)) return $this->statusList[$key];
|
||||
else $this->getDefaultStatus();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue