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

Ticket #4120 - Organizations: Allow to enable browsing organizations by context.

AntonLV 3 лет назад
Родитель
Сommit
1ebaad8eba

+ 2 - 4
modules/boonex/groups/classes/BxGroupsSearchResult.php

@@ -80,15 +80,13 @@ class BxGroupsSearchResult extends BxBaseModGroupsSearchResult
         $bProcessConditionsForPrivateContent = true;
         switch ($sMode) {
             case 'created_entries':
-                if(!$this->_setAuthorConditions($sMode, $aParams, $oJoinedProfile)) {
+                if(!$this->_setAuthorConditions($sMode, $aParams, $oJoinedProfile))
                     $this->isError = true;
-                    break;
-                }
                 break;
 
             case 'context':
                 $oProfileContext = null;
-                if(!$this->_updateCurrentForContext($sMode, $aParams, $oProfileAuthor))
+                if(!$this->_updateCurrentForContext($sMode, $aParams, $oProfileContext))
                     $this->isError = true;
                 break;
 

+ 10 - 0
modules/boonex/organizations/classes/BxOrgsSearchResult.php

@@ -91,6 +91,16 @@ class BxOrgsSearchResult extends BxBaseModGroupsSearchResult
         $this->_setAccountConfirmationConditions($aParams);
 
         switch ($sMode) {
+            case 'created_entries':
+                if(!$this->_setAuthorConditions($sMode, $aParams, $oJoinedProfile))
+                    $this->isError = true;
+                break;
+
+            case 'context':
+                $oProfileContext = null;
+                if(!$this->_updateCurrentForContext($sMode, $aParams, $oProfileContext))
+                    $this->isError = true;
+                break;
 
             case 'joined_entries':
                 $oJoinedProfile = BxDolProfile::getInstance((int)$aParams['joined_profile']);