mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-17 18:29:55 +09:00
merge from branch luminous (version 1.5.4.2, ~r12561)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@12611 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2263200ce4
commit
cc47d2b247
196 changed files with 3655 additions and 2033 deletions
|
|
@ -44,7 +44,7 @@
|
|||
// get a list by using comment->getCommentList.
|
||||
$oCommentModel = &getModel('comment');
|
||||
$secretNameList = $oCommentModel->getSecretNameList();
|
||||
$columnList = array('comment_srl', 'document_srl', 'is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress');
|
||||
$columnList = array('comment_srl', 'document_srl', 'is_secret', 'status', 'content', 'comments.member_srl', 'comments.nick_name', 'comments.regdate', 'ipaddress', 'voted_count', 'blamed_count');
|
||||
$output = $oCommentModel->getTotalCommentList($args, $columnList);
|
||||
|
||||
$oCommentModel = &getModel("comment");
|
||||
|
|
|
|||
|
|
@ -69,7 +69,10 @@
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -128,6 +131,12 @@
|
|||
array("status", "comment_srl", "module_srl", "document_srl"),
|
||||
true
|
||||
);
|
||||
|
||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after'))
|
||||
{
|
||||
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'comment', 'controller', 'triggerCopyModule', 'after');
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,8 +112,13 @@
|
|||
* @param int $module_srl
|
||||
* @return bool
|
||||
*/
|
||||
function isModuleUsingPublishValidation($document_srl=null, $module_srl=null)
|
||||
function isModuleUsingPublishValidation($module_srl=null)
|
||||
{
|
||||
if(!$module_srl == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
$module_part_config = $oModuleModel->getModulePartConfig('comment',$module_info->module_srl);
|
||||
|
|
@ -956,36 +961,51 @@
|
|||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get comment all list
|
||||
* @return void
|
||||
*/
|
||||
function procCommentGetList()
|
||||
{
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
|
||||
$commentSrls = Context::get('comment_srls');
|
||||
if($commentSrls) $commentSrlList = explode(',', $commentSrls);
|
||||
/**
|
||||
* Get comment all list
|
||||
* @return void
|
||||
*/
|
||||
function procCommentGetList()
|
||||
{
|
||||
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
|
||||
$commentSrls = Context::get('comment_srls');
|
||||
if($commentSrls) $commentSrlList = explode(',', $commentSrls);
|
||||
|
||||
if(count($commentSrlList) > 0) {
|
||||
$oCommentModel = &getModel('comment');
|
||||
$commentList = $oCommentModel->getComments($commentSrlList);
|
||||
if(count($commentSrlList) > 0) {
|
||||
$oCommentModel = &getModel('comment');
|
||||
$commentList = $oCommentModel->getComments($commentSrlList);
|
||||
|
||||
if(is_array($commentList))
|
||||
{
|
||||
foreach($commentList AS $key=>$value)
|
||||
if(is_array($commentList))
|
||||
{
|
||||
$value->content = strip_tags($value->content);
|
||||
foreach($commentList AS $key=>$value)
|
||||
{
|
||||
$value->content = strip_tags($value->content);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
global $lang;
|
||||
$commentList = array();
|
||||
$this->setMessage($lang->no_documents);
|
||||
}
|
||||
|
||||
$this->add('comment_list', $commentList);
|
||||
}
|
||||
|
||||
function triggerCopyModule(&$obj)
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$commentConfig = $oModuleModel->getModulePartConfig('comment', $obj->originModuleSrl);
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
if(is_array($obj->moduleSrlList))
|
||||
{
|
||||
foreach($obj->moduleSrlList AS $key=>$moduleSrl)
|
||||
{
|
||||
$oModuleController->insertModulePartConfig('comment', $moduleSrl, $commentConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
global $lang;
|
||||
$commentList = array();
|
||||
$this->setMessage($lang->no_documents);
|
||||
}
|
||||
|
||||
$this->add('comment_list', $commentList);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -314,7 +314,7 @@
|
|||
if(!$this->get('uploaded_count')) return;
|
||||
|
||||
$oFileModel = &getModel('file');
|
||||
$file_list = $oFileModel->getFiles($this->comment_srl, $is_admin);
|
||||
$file_list = $oFileModel->getFiles($this->comment_srl, array(), 'file_srl', true);
|
||||
return $file_list;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
<condition operation="in" column="module_srl" var="module_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="status" order="desc" />
|
||||
<index var="sort_index" default="list_order" order="asc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
</navigation>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@
|
|||
<column name="last_update" var="last_update" default="curdate()" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
<column name="list_order" var="list_order" default="0" />
|
||||
<column name="status" var="status" notnull="notnull" default="0" />
|
||||
<column name="status" var="status" notnull="notnull" default="1" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<tr>
|
||||
<td class="text"><a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}" target="_blank"><!--@if(strlen($comment))-->{$comment}<!--@else--><em>{$lang->no_text_comment}</em><!--@end--></a></td>
|
||||
<td class="nowr"><a href="#popup_menu_area" class="member_{$val->member_srl}">{$val->nick_name}</a></td>
|
||||
<td class="nowr">0/0</td>
|
||||
<td class="nowr">{number_format($val->get('voted_count'))}/{number_format($val->get('blamed_count'))}</td>
|
||||
<td class="nowr">{(zdate($val->regdate,"Y-m-d\nH:i:s"))}</td>
|
||||
<td class="nowr"><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
|
||||
<td class="nowr"><!--@if($val->isSecret())-->{$secret_name_list['Y']}<!--@else-->{$secret_name_list['N']}<!--@end--></td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue