HomeHelpTrac

Changeset 13280


Ignore:
Timestamp:
11/20/09 02:26:10 (2 years ago)
Author:
Alexander Ermashev
Message:
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/inc/classes/BxDolMailBox.php

    r13125 r13280  
    3030    define ('BX_MAILBOX_SEND_RECIPIENT_NOT_ACTIVE', 10); 
    3131    define ('BX_MAILBOX_SEND_UNKNOWN_RECIPIENT', 1000); 
     32    define ('BX_MAILBOX_SEND_FAILED_MEMBERSHIP_DISALLOW', 1001); 
    3233 
    3334    class BxDolMailBox extends BxDolPageView 
     
    816817                } 
    817818 
     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 
    818826                // ** allow to send message ; 
    819827                if ( $bAllowToSend ) 
     
    9921000        } 
    9931001 
     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        } 
    9941019    } 
  • trunk/install/langs/lang-en.php

    r13251 r13280  
    27522752    '_Refresh' => 'Refresh', 
    27532753    '_FieldCaption_City_Search' => 'City', 
     2754    '_FAILED_TO_SEND_MESSAGE_MEMBERSHIP_DISALLOW' => 'Your membership level doesn\'t allow you to send message', 
    27542755    ); 
    27552756?> 
Note: See TracChangeset for help on using the changeset viewer.