mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Determine administrator status more accurately #1851
This commit is contained in:
parent
4eced6daf0
commit
9e67b5b010
1 changed files with 9 additions and 2 deletions
|
|
@ -748,7 +748,7 @@ class boardController extends board
|
|||
/**
|
||||
* @brief the trigger for displaying 'view document' link when click the user ID
|
||||
**/
|
||||
function triggerMemberMenu(&$obj)
|
||||
function triggerMemberMenu($obj)
|
||||
{
|
||||
if(!$mid = Context::get('cur_mid'))
|
||||
{
|
||||
|
|
@ -757,10 +757,17 @@ class boardController extends board
|
|||
|
||||
// get the module information
|
||||
$module_info = ModuleModel::getModuleInfoByMid($mid);
|
||||
if(empty($module_info->module) || $module_info->module !== 'board' || $module_info->use_anonymous === 'Y')
|
||||
if (!$module_info || !isset($module_info->module) || $module_info->module !== 'board')
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (($module_info->use_anonymous ?? 'N') === 'Y')
|
||||
{
|
||||
if (($module_info->anonymous_except_admin ?? 'N') !== 'Y' || !ModuleModel::isModuleAdmin($obj, $module_info->module_srl))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$url = getUrl('', 'mid', $mid, 'member_srl', $obj->member_srl);
|
||||
getController('member')->addMemberPopupMenu($url, 'cmd_view_own_document', '', 'self', 'board_own_document');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue