From ae99536662aca91a2f0b7d07b37a6ebcec15d7fa Mon Sep 17 00:00:00 2001 From: flyskyko Date: Thu, 15 Mar 2012 01:41:29 +0000 Subject: [PATCH] issue 1647, fixed a mis-typo, send a message to member which not allow message git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10434 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/communication/communication.controller.php | 2 +- modules/communication/communication.view.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/communication/communication.controller.php b/modules/communication/communication.controller.php index 1c3066901..5fac8f36d 100644 --- a/modules/communication/communication.controller.php +++ b/modules/communication/communication.controller.php @@ -63,7 +63,7 @@ if($logged_info->is_admin != 'Y') { if($receiver_member_info->allow_message == 'F') { if(!$oCommunicationModel->isFriend($receiver_member_info->member_srl)) return new object(-1, 'msg_allow_message_to_friend'); - } elseif($receiver_member_info->allow_messge == 'N') { + } elseif($receiver_member_info->allow_message == 'N') { return new object(-1, 'msg_disallow_message'); } } diff --git a/modules/communication/communication.view.php b/modules/communication/communication.view.php index 589d4cfaf..b6cb654a1 100644 --- a/modules/communication/communication.view.php +++ b/modules/communication/communication.view.php @@ -130,6 +130,11 @@ } $receiver_info = $oMemberModel->getMemberInfoByMemberSrl($receiver_srl); + if(!$receiver_info) + { + return $this->stop('msg_invalid_request'); + } + Context::set('receiver_info', $receiver_info); // set a signiture by calling getEditor of the editor module $oEditorModel = &getModel('editor');