|
@@ -1449,7 +1449,7 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
|
|
|
*/
|
|
*/
|
|
|
public function serviceGetNotificationsJoinRequest($aEvent)
|
|
public function serviceGetNotificationsJoinRequest($aEvent)
|
|
|
{
|
|
{
|
|
|
- return $this->_serviceGetNotification($aEvent, $this->_oConfig->CNF['T']['txt_ntfs_join_request']);
|
|
|
|
|
|
|
+ return $this->_serviceGetNotification($aEvent, 'join_request', $this->_oConfig->CNF['T']['txt_ntfs_join_request']);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1457,10 +1457,10 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
|
|
|
*/
|
|
*/
|
|
|
public function serviceGetNotificationsFanAdded($aEvent)
|
|
public function serviceGetNotificationsFanAdded($aEvent)
|
|
|
{
|
|
{
|
|
|
- return $this->_serviceGetNotification($aEvent, $this->_oConfig->CNF['T']['txt_ntfs_fan_added']);
|
|
|
|
|
|
|
+ return $this->_serviceGetNotification($aEvent, 'fan_added', $this->_oConfig->CNF['T']['txt_ntfs_fan_added']);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- protected function _serviceGetNotification($aEvent, $sLangKey)
|
|
|
|
|
|
|
+ protected function _serviceGetNotification($aEvent, $sType, $sLangKey)
|
|
|
{
|
|
{
|
|
|
$CNF = &$this->_oConfig->CNF;
|
|
$CNF = &$this->_oConfig->CNF;
|
|
|
|
|
|
|
@@ -1477,24 +1477,30 @@ class BxBaseModGroupsModule extends BxBaseModProfileModule
|
|
|
if(!$oProfile)
|
|
if(!$oProfile)
|
|
|
return array();
|
|
return array();
|
|
|
|
|
|
|
|
|
|
+ $iGroupProfileId = $oGroupProfile->id();
|
|
|
|
|
+
|
|
|
/*
|
|
/*
|
|
|
* Note. Group Profile URL is used for both Entry and Subentry URLs,
|
|
* Note. Group Profile URL is used for both Entry and Subentry URLs,
|
|
|
* because Subentry URL has higher display priority and notification
|
|
* because Subentry URL has higher display priority and notification
|
|
|
- * should be linked to Group Profile (Group Profile -> Members tab)
|
|
|
|
|
|
|
+ * should be linked to Group Profile (Group Profile -> Members tab or Manage page)
|
|
|
* instead of Personal Profile of a member, who performed an action.
|
|
* instead of Personal Profile of a member, who performed an action.
|
|
|
*/
|
|
*/
|
|
|
- if(empty($CNF['URL_ENTRY_FANS']))
|
|
|
|
|
- $sEntryUrl = bx_absolute_url(str_replace(BX_DOL_URL_ROOT, '', $oGroupProfile->getUrl()), '{bx_url_root}');
|
|
|
|
|
- else
|
|
|
|
|
|
|
+ if($sType == 'join_request' && !empty($CNF['URL_ENTRY_MANAGE']))
|
|
|
|
|
+ $sEntryUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_ENTRY_MANAGE'], [
|
|
|
|
|
+ 'profile_id' => $iGroupProfileId
|
|
|
|
|
+ ]), '{bx_url_root}');
|
|
|
|
|
+ else if(!empty($CNF['URL_ENTRY_FANS']))
|
|
|
$sEntryUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_ENTRY_FANS'], [
|
|
$sEntryUrl = bx_absolute_url(BxDolPermalinks::getInstance()->permalink($CNF['URL_ENTRY_FANS'], [
|
|
|
- 'profile_id' => $oGroupProfile->id()
|
|
|
|
|
|
|
+ 'profile_id' => $iGroupProfileId
|
|
|
]), '{bx_url_root}');
|
|
]), '{bx_url_root}');
|
|
|
|
|
+ else
|
|
|
|
|
+ $sEntryUrl = bx_absolute_url(str_replace(BX_DOL_URL_ROOT, '', $oGroupProfile->getUrl()), '{bx_url_root}');
|
|
|
|
|
|
|
|
return [
|
|
return [
|
|
|
'entry_sample' => $CNF['T']['txt_sample_single'],
|
|
'entry_sample' => $CNF['T']['txt_sample_single'],
|
|
|
'entry_url' => $sEntryUrl,
|
|
'entry_url' => $sEntryUrl,
|
|
|
'entry_caption' => $oGroupProfile->getDisplayName(),
|
|
'entry_caption' => $oGroupProfile->getDisplayName(),
|
|
|
- 'entry_author' => $oGroupProfile->id(),
|
|
|
|
|
|
|
+ 'entry_author' => $iGroupProfileId,
|
|
|
'subentry_sample' => $oProfile->getDisplayName(),
|
|
'subentry_sample' => $oProfile->getDisplayName(),
|
|
|
'subentry_url' => $sEntryUrl,
|
|
'subentry_url' => $sEntryUrl,
|
|
|
'lang_key' => $sLangKey
|
|
'lang_key' => $sLangKey
|