mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-18 00:12:16 +09:00
Hide friend-related options and error messages if friend feature is disabled #2702
This commit is contained in:
parent
f9119c8ba3
commit
4090d6f5d7
3 changed files with 16 additions and 2 deletions
|
|
@ -117,7 +117,14 @@ class CommunicationController extends communication
|
|||
{
|
||||
if(!$oCommunicationModel->isFriend($receiver_member_info->member_srl))
|
||||
{
|
||||
throw new Rhymix\Framework\Exception('msg_allow_message_to_friend');
|
||||
if ($config->enable_friend === 'Y')
|
||||
{
|
||||
throw new Rhymix\Framework\Exception('msg_allow_message_to_friend');
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Rhymix\Framework\Exception('msg_disallow_message');
|
||||
}
|
||||
}
|
||||
}
|
||||
else if($receiver_member_info->allow_message == 'N')
|
||||
|
|
|
|||
|
|
@ -127,6 +127,13 @@ class CommunicationView extends communication
|
|||
$page = max(1, intval(Context::get('page')));
|
||||
$output = $oCommunicationModel->getMessages($message_type, $columnList, $search_target, $search_keyword, $page);
|
||||
|
||||
$allow_message_type = lang('allow_message_type')->getArrayCopy();
|
||||
if ($this->config->allow_friend === 'N')
|
||||
{
|
||||
unset($allow_message_type['F']);
|
||||
}
|
||||
Context::set('allow_message_type', $allow_message_type);
|
||||
|
||||
// set a template file
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<input type="hidden" name="act" value="procCommunicationUpdateAllowMessage" />
|
||||
<input type="hidden" name="message_type" value="{$message_type}" />
|
||||
<select name="allow_message" style="margin:0">
|
||||
<option loop="$lang->allow_message_type => $key,$val" value="{$key}" selected="selected"|cond="$logged_info->allow_message==$key">{$val}</option>
|
||||
<option loop="$allow_message_type => $key,$val" value="{$key}" selected="selected"|cond="$logged_info->allow_message==$key">{$val}</option>
|
||||
</select>
|
||||
<input type="submit" value="{$lang->cmd_save}" class="btn">
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue