|
|
@@ -275,18 +275,22 @@ class BxDolConnection extends BxDolFactory implements iBxDolFactoryObject
|
|
|
* @param $iContent content to make connection to, in most cases some content id, or other profile id in case of friends
|
|
|
* @return true - if connection was added, false - if connection already exists or error occured
|
|
|
*/
|
|
|
- public function addConnection ($iInitiator, $iContent)
|
|
|
+ public function addConnection ($iInitiator, $iContent, $aParams = array())
|
|
|
{
|
|
|
$iMutual = 0;
|
|
|
if (!$this->_oQuery->addConnection((int)$iInitiator, (int)$iContent, $iMutual))
|
|
|
return false;
|
|
|
|
|
|
- bx_alert($this->_sObject, 'connection_added', 0, bx_get_logged_profile_id(), array(
|
|
|
+ $aAlertExtras = array(
|
|
|
'initiator' => (int)$iInitiator,
|
|
|
'content' => (int)$iContent,
|
|
|
'mutual' => (int)$iMutual,
|
|
|
'object' => $this,
|
|
|
- ));
|
|
|
+ );
|
|
|
+ if(!empty($aParams['alert_extras']) && is_array($aParams['alert_extras']))
|
|
|
+ $aAlertExtras = array_merge($aAlertExtras, $aParams['alert_extras']);
|
|
|
+
|
|
|
+ bx_alert($this->_sObject, 'connection_added', 0, bx_get_logged_profile_id(), $aAlertExtras);
|
|
|
|
|
|
$this->checkAllowedConnect ($iInitiator, $iContent, true, $iMutual, false);
|
|
|
|