for textyle

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6226 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2009-04-28 10:18:09 +00:00
parent 7a6123ec84
commit 97793ab921
5 changed files with 41 additions and 7 deletions

View file

@ -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();
}
}
?>

View file

@ -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 해당하는 댓글을 가져옴
**/

View file

@ -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>