issue 2298 if module_srl is empty value, not execute isModuleUsingPublishValidation method.

git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11119 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-08-30 01:55:12 +00:00
parent 804422dc03
commit eef98545f4

View file

@ -280,27 +280,30 @@
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
$args->list_count = $obj->list_count;
// cache controll
// cache controll
$oCacheHandler = &CacheHandler::getInstance('object');
if($oCacheHandler->isSupport()){
$object_key = 'object_newest_comment_list:'.$obj->module_srl;
$cache_key = $oCacheHandler->getGroupKey('newestCommentsList', $object_key);
$cache_key = $oCacheHandler->getGroupKey('newestCommentsList', $object_key);
$output = $oCacheHandler->get($cache_key);
}
if(!$output){
if(!$output)
{
if(strpos($args->module_srl,",")===false)
{
// check if module is using comment validation system
$oCommentController = &getController("comment");
$is_using_validation = $oCommentController->isModuleUsingPublishValidation($obj->module_srl);
if($is_using_validation)
if($args->module_srl)
{
$args->status = 1;
// check if module is using comment validation system
$oCommentController = &getController("comment");
$is_using_validation = $oCommentController->isModuleUsingPublishValidation($obj->module_srl);
if($is_using_validation)
{
$args->status = 1;
}
}
}
$output = executeQuery('comment.getNewestCommentList', $args, $columnList);
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key,$output);
$output = executeQuery('comment.getNewestCommentList', $args, $columnList);
if($oCacheHandler->isSupport()) $oCacheHandler->put($cache_key,$output);
}
if(!$output->toBool()) return $output;