mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
for textyle
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6226 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7a6123ec84
commit
97793ab921
5 changed files with 41 additions and 7 deletions
|
|
@ -576,19 +576,23 @@
|
|||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
$comment_config = null;
|
||||
$comment_config->comment_count = (int)Context::get('comment_count');
|
||||
if(!$comment_config->comment_count) $comment_config->comment_count = 50;
|
||||
$comment_count = (int)Context::get('comment_count');
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
for($i=0;$i<count($module_srl);$i++) {
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$output = $oModuleController->insertModulePartConfig('comment',$srl,$comment_config);
|
||||
$output = $this->setCommentModuleConfig($srl,$comment_count);
|
||||
}
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
function setCommentModuleConfig($srl, $comment_count=50){
|
||||
$comment_config->comment_count = $comment_count;
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModulePartConfig('comment',$srl,$comment_config);
|
||||
return new Object();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -146,6 +146,20 @@
|
|||
return (int)$total_count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief module_srl 에 해당하는 댓글의 전체 갯수를 가져옴
|
||||
**/
|
||||
function getCommentAllCount($module_srl) {
|
||||
$args->module_srl = $module_srl;
|
||||
$output = executeQuery('comment.getCommentCount', $args);
|
||||
debugPrint($output);
|
||||
$total_count = $output->data->count;
|
||||
|
||||
return (int)$total_count;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief mid 에 해당하는 댓글을 가져옴
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
<column name="count(*)" alias="count" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" default="0" />
|
||||
<condition operation="equal" column="module_srl" var="module_srl" filter="number" pipe="and" />
|
||||
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue