mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Merge branch 'rhymix:master' into master
This commit is contained in:
commit
ef9967fc1d
81 changed files with 923 additions and 726 deletions
|
|
@ -67,26 +67,12 @@ class CommentAdminView extends Comment
|
|||
Context::set('secret_name_list', $secretNameList);
|
||||
|
||||
// Module List
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = array();
|
||||
$mod_srls = array();
|
||||
foreach($output->data as $val)
|
||||
$module_list = [];
|
||||
$mod_output = executeQueryArray('comment.getModuleList');
|
||||
foreach ($mod_output->data as $item)
|
||||
{
|
||||
$mod_srls[] = $val->module_srl;
|
||||
}
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
$mod_srls_count = count($mod_srls);
|
||||
if($mod_srls_count)
|
||||
{
|
||||
$columnList = array('module_srl', 'mid', 'browser_title');
|
||||
$module_output = $oModuleModel->getModulesInfo($mod_srls, $columnList);
|
||||
if($module_output && is_array($module_output))
|
||||
{
|
||||
foreach($module_output as $module)
|
||||
{
|
||||
$module_list[$module->module_srl] = $module;
|
||||
}
|
||||
}
|
||||
$item->browser_title = Context::replaceUserLang($item->browser_title);
|
||||
$module_list[$item->module_srl] = $item;
|
||||
}
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
|
|
@ -115,8 +101,9 @@ class CommentAdminView extends Comment
|
|||
}
|
||||
Context::set('member_nick_name', $member_nick_name);
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('search_target', 'search_keyword');
|
||||
// Other search options
|
||||
Context::set('search_target', escape(Context::get('search_target'), false));
|
||||
Context::set('search_keyword', escape(Context::get('search_keyword'), false));
|
||||
|
||||
// set the template
|
||||
$this->setTemplatePath($this->module_path . 'tpl');
|
||||
|
|
|
|||
|
|
@ -1606,9 +1606,16 @@ class CommentController extends Comment
|
|||
}
|
||||
|
||||
// invalid vote if vote info exists in the session info.
|
||||
if(!empty($_SESSION['voted_comment'][$comment_srl]))
|
||||
if (!empty($_SESSION['voted_comment'][$comment_srl]))
|
||||
{
|
||||
return new BaseObject(-1, $failed_voted . '_already');
|
||||
if ($_SESSION['voted_comment'][$comment_srl] > 0)
|
||||
{
|
||||
return new BaseObject(-1, 'failed_voted_already');
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'failed_blamed_already');
|
||||
}
|
||||
}
|
||||
|
||||
// Get the original comment
|
||||
|
|
@ -1650,10 +1657,17 @@ class CommentController extends Comment
|
|||
$output = executeQuery('comment.getCommentVotedLogInfo', $args);
|
||||
|
||||
// Pass after registering a session if log information has vote-up logs
|
||||
if($output->data->count)
|
||||
if ($output->data->count)
|
||||
{
|
||||
$_SESSION['voted_comment'][$comment_srl] = false;
|
||||
return new BaseObject(-1, $failed_voted);
|
||||
$_SESSION['voted_comment'][$comment_srl] = intval($output->data->point);
|
||||
if ($output->data->point > 0)
|
||||
{
|
||||
return new BaseObject(-1, 'failed_voted_already');
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'failed_blamed_already');
|
||||
}
|
||||
}
|
||||
|
||||
// Call a trigger (before)
|
||||
|
|
|
|||
|
|
@ -594,7 +594,7 @@ class CommentItem extends BaseObject
|
|||
|
||||
// Truncate string
|
||||
$content = cut_str($content, $str_size, $tail);
|
||||
$content = escape($content);
|
||||
$content = escape($content, false);
|
||||
|
||||
if ($content === '')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
</tables>
|
||||
<columns>
|
||||
<column name="count(*)" alias="count" />
|
||||
<column name="sum(point)" alias="point" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="comment_srl" var="comment_srl" filter="number" notnull="notnull" />
|
||||
|
|
|
|||
20
modules/comment/queries/getModuleList.xml
Normal file
20
modules/comment/queries/getModuleList.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<query id="getModuleList" action="select">
|
||||
<tables>
|
||||
<table name="modules" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="module_srl" />
|
||||
<column name="mid" />
|
||||
<column name="browser_title" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<query operation="in" column="module_srl">
|
||||
<tables>
|
||||
<table name="comments" />
|
||||
</tables>
|
||||
<columns distinct="distinct">
|
||||
<column name="module_srl" />
|
||||
</columns>
|
||||
</query>
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -124,8 +124,13 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<form action="./" method="get" class="search center x_input-append" onsubmit="return checkSearch(this)">
|
||||
<input type="hidden" name="module" value="{$module}" />
|
||||
<input type="hidden" name="act" value="{$act}" />
|
||||
<input type="hidden" name="module_srl" value="{$module_srl}" />
|
||||
<input type="hidden" name="error_return_url" value="" />
|
||||
<select name="module_srl" style="margin-right:4px">
|
||||
<option value="">{lang('all')}</option>
|
||||
<!--@foreach($module_list as $item)-->
|
||||
<option value="{$item->module_srl}" <!--@if(isset($module_srl) && $module_srl == $item->module_srl)-->selected="selected"<!--@end-->>{$item->browser_title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<select name="search_target" title="{$lang->search_target}" style="margin-right:4px">
|
||||
<!--@foreach(lang('comment.search_target_list') as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue