Changeset 13280
- Timestamp:
- 11/20/09 02:26:10 (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
inc/classes/BxDolMailBox.php (modified) (3 diffs)
-
install/langs/lang-en.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/classes/BxDolMailBox.php
r13125 r13280 30 30 define ('BX_MAILBOX_SEND_RECIPIENT_NOT_ACTIVE', 10); 31 31 define ('BX_MAILBOX_SEND_UNKNOWN_RECIPIENT', 1000); 32 define ('BX_MAILBOX_SEND_FAILED_MEMBERSHIP_DISALLOW', 1001); 32 33 33 34 class BxDolMailBox extends BxDolPageView … … 816 817 } 817 818 819 // chek membership level; 820 if(!$this -> isSendMessageAlowed($this -> aMailBoxSettings['member_id'], true) ) { 821 $sReturnMessage = MsgBox( _t('_FAILED_TO_SEND_MESSAGE_MEMBERSHIP_DISALLOW') ); 822 $this -> iSendMessageStatusCode = BX_MAILBOX_SEND_FAILED_MEMBERSHIP_DISALLOW; 823 $bAllowToSend = false; 824 } 825 818 826 // ** allow to send message ; 819 827 if ( $bAllowToSend ) … … 992 1000 } 993 1001 1002 /** 1003 * Function will check membership level for current type if users; 1004 * 1005 * @param : $iMemberId (integer) - member's Id; 1006 * @param : $isPerformAction (boolean) - if isset this parameter that function will amplify the old action's value; 1007 */ 1008 function isSendMessageAlowed($iMemberId, $isPerformAction = false) 1009 { 1010 $this -> _defineActions(); 1011 $aCheck = checkAction($iMemberId, BX_SEND_MESSAGES, $isPerformAction); 1012 return $aCheck[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED; 1013 } 1014 1015 function _defineActions() 1016 { 1017 defineMembershipActions( array('send messages') ); 1018 } 994 1019 } -
trunk/install/langs/lang-en.php
r13251 r13280 2752 2752 '_Refresh' => 'Refresh', 2753 2753 '_FieldCaption_City_Search' => 'City', 2754 '_FAILED_TO_SEND_MESSAGE_MEMBERSHIP_DISALLOW' => 'Your membership level doesn\'t allow you to send message', 2754 2755 ); 2755 2756 ?>
Note: See TracChangeset
for help on using the changeset viewer.