mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 15:22:15 +09:00
Improve anonymous nickname handling
This commit is contained in:
parent
81b5230c9c
commit
e25b36ee64
7 changed files with 90 additions and 24 deletions
|
|
@ -72,13 +72,34 @@ class documentAdminView extends document
|
|||
}
|
||||
Context::set('search_option', $search_option);
|
||||
|
||||
// Module List
|
||||
$oModuleModel = getModel('module');
|
||||
$module_list = array();
|
||||
$mod_srls = array();
|
||||
$anonymous_member_srls = array();
|
||||
foreach($output->data as $oDocument)
|
||||
{
|
||||
$mod_srls[] = $oDocument->get('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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
// Get anonymous nicknames
|
||||
$anonymous_member_srls = array();
|
||||
foreach($output->data as $oDocument)
|
||||
{
|
||||
if($oDocument->get('member_srl') < 0)
|
||||
{
|
||||
$anonymous_member_srls[] = abs($oDocument->get('member_srl'));
|
||||
|
|
@ -99,22 +120,6 @@ class documentAdminView extends document
|
|||
}
|
||||
}
|
||||
Context::set('member_nick_name', $member_nick_neme);
|
||||
$mod_srls = array_unique($mod_srls);
|
||||
// Module List
|
||||
$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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Context::set('module_list', $module_list);
|
||||
|
||||
// Specify a template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
</block>
|
||||
<a href="{getUrl('','document_srl',$oDocument->document_srl)}" target="_blank"><!--@if(trim($oDocument->getTitleText()))-->{htmlspecialchars($oDocument->getTitleText())}<!--@else--><em>{$lang->no_title_document}</em><!--@end--></a></td>
|
||||
<td class="nowr">
|
||||
<a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}" cond="$oDocument->get('member_srl') > 0 || $oDocument->get('member_srl') == 0">{$oDocument->getNickName()}</a>
|
||||
<span cond="$oDocument->get('member_srl') == 0">{$oDocument->getNickName()}</span>
|
||||
<a href="#popup_menu_area" class="member_{$oDocument->get('member_srl')}" cond="$oDocument->get('member_srl') > 0">{$oDocument->getNickName()}</a>
|
||||
<a href="#popup_menu_area" class="member_{abs($oDocument->get('member_srl'))}" cond="$oDocument->get('member_srl') < 0 && $member_nick_name[abs($oDocument->get('member_srl'))]">({$lang->anonymous}) {$member_nick_name[abs($oDocument->get('member_srl'))]}</a>
|
||||
</td>
|
||||
<td class="nowr">{$oDocument->get('readed_count')}</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue