Skip to content

Commit

Permalink
Ticket #4558 - Build-in API support: Pass specific browsing params.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLV committed Sep 18, 2024
1 parent 694125c commit fd67aef
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions modules/base/groups/classes/BxBaseModGroupsSearchResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,41 @@ public function displaySearchBox ($sContent, $sPaginate = '')

return $aResult;
}

public function processingAPI ()
{
$aResult = parent::processingAPI();

switch($this->_sMode) {
case 'created_entries':
if(isset($this->_aParams['author']))
$aResult['params']['author'] = $this->_aParams['author'];
break;

case 'joined_entries':
if(isset($this->_aParams['joined_profile']))
$aResult['params']['joined_profile'] = $this->_aParams['joined_profile'];
break;

case 'followed_entries':
if(isset($this->_aParams['followed_profile']))
$aResult['params']['followed_profile'] = $this->_aParams['followed_profile'];
break;

case 'context':
if(isset($this->_aParams['context']))
$aResult['params']['context'] = $this->_aParams['context'];
break;

case 'connections':
foreach(['object', 'type', 'profile', 'profile2', 'mutual'] as $sParam)
if(isset($this->_aParams[$sParam]))
$aResult['params'][$sParam] = $this->_aParams[$sParam];
break;
}

return $aResult;
}

protected function addConditionsForPrivateContent($CNF, $oProfile, $aCustomGroup = array())
{
Expand Down

0 comments on commit fd67aef

Please sign in to comment.