Просмотр исходного кода

Merge branch 'master' of https://github.com/unaio/una

AntonLV 8 лет назад
Родитель
Сommit
f9639d528e

+ 0 - 2
inc/classes/BxDolProfile.php

@@ -482,8 +482,6 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
 
         // alert about status changing
         bx_alert('profile', $sAlertActionName, $iProfileId, false, array('action' => $iAction));
-
-        $bSendEmailNotification = $bSendEmailNotification & BxDolService::call($this->getModule(), 'is_enable_profile_activation_letter');
         
         // send email to member about status change
         if ($bSendEmailNotification)

+ 1 - 1
modules/base/profile/classes/BxBaseModProfileFormsEntryHelper.php

@@ -123,7 +123,7 @@ class BxBaseModProfileFormsEntryHelper extends BxBaseModGeneralFormsEntryHelper
         // approve profile if auto-approval is enabled and profile status is 'pending'
         $sStatus = $oProfile->getStatus();
         if ($sStatus == BX_PROFILE_STATUS_PENDING && $this->isAutoApproval())
-            $oProfile->approve(BX_PROFILE_ACTION_AUTO, 0, $this->_oModule->serviceActAsProfile());
+            $oProfile->approve(BX_PROFILE_ACTION_AUTO, 0, $this->_oModule->serviceActAsProfile() && $this->_oModule->serviceIsEnableProfileActivationLetter());
 
         // set created profile some default membership
         if ((int)bx_get('level_id') && bx_srv('bx_acl', 'get_prices', [(int)bx_get('level_id'), true]))

+ 1 - 1
modules/base/profile/classes/BxBaseModProfileModule.php

@@ -679,7 +679,7 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
     public function  serviceIsEnableProfileActivationLetter()
     {
         $CNF = &$this->_oConfig->CNF;
-        return (bool)getParam($CNF['PARAM_ENABLE_ACTIVATION_LETTER']).$CNF['PARAM_ENABLE_ACTIVATION_LETTER'];//isset($CNF['PARAM_ENABLE_ACTIVATION_LETTER']) ? (bool)getParam($CNF['PARAM_ENABLE_ACTIVATION_LETTER']) : true;
+        return isset($CNF['PARAM_ENABLE_ACTIVATION_LETTER']) ? (bool)getParam($CNF['PARAM_ENABLE_ACTIVATION_LETTER']) : true;
     }
     
     /**

+ 1 - 1
modules/boonex/invites/classes/BxInvModule.php

@@ -321,7 +321,7 @@ class BxInvModule extends BxDolModule
      */
     public function serviceGetNotificationsRequest($aEvent)
     {  
-        if (getParam('bx_invites_requests_notifictaions') != 'on')
+        if (getParam('bx_invites_requests_notifications') != 'on')
              return array();
         
         $aRequest = $this->_oDb->getRequests(array('type' => 'by_id', 'value' => $aEvent['object_id']));

+ 1 - 1
modules/boonex/invites/install/langs/en.xml

@@ -76,7 +76,7 @@
 	<string name="_bx_invites_option_count_per_user"><![CDATA[How many invitations one user can send]]></string>
 	<string name="_bx_invites_option_key_lifetime"><![CDATA[Invitation key lifetime (in days)]]></string>
 	<string name="_bx_invites_option_enable_request_invite"><![CDATA[Enable invitation requests by email]]></string>
-  <string name="_bx_invites_option_requests_notifictaions"><![CDATA[Enable invitation requests in notifictaions]]></string>
+  <string name="_bx_invites_option_requests_notifications"><![CDATA[Enable invitation requests in notifications]]></string>
   <string name="_bx_invites_option_requests_email"><![CDATA[Email to send invitation requests to]]></string>
 	<string name="_bx_invites_option_enable_reg_by_inv"><![CDATA[Enable registration by invitation only]]></string>
 

+ 1 - 1
modules/boonex/invites/install/sql/enable.sql

@@ -50,7 +50,7 @@ INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `c
 ('bx_invites_enable_request_invite', 'on', @iCategId, '_bx_invites_option_enable_request_invite', 'checkbox', '', '', '', 3),
 ('bx_invites_requests_email', '', @iCategId, '_bx_invites_option_requests_email', 'digit', '', '', '', 4),
 ('bx_invites_enable_reg_by_inv', 'on', @iCategId, '_bx_invites_option_enable_reg_by_inv', 'checkbox', '', '', '', 5),
-('bx_invites_requests_notifictaions', 'on', @iCategId, '_bx_invites_option_requests_notifictaions', 'checkbox', '', '', '', 6);
+('bx_invites_requests_notifications', 'on', @iCategId, '_bx_invites_option_requests_notifictaions', 'checkbox', '', '', '', 6);
 
 
 -- ACL

BIN
scripts/pharcommand.phar


BIN
scripts/php-cs-fixer-v2.phar