BxCnlModule.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defdroup Channels Channels
  7. * @indroup UnaModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * Channels profiles module.
  13. */
  14. class BxCnlModule extends BxBaseModGroupsModule
  15. {
  16. function __construct(&$aModule)
  17. {
  18. parent::__construct($aModule);
  19. }
  20. public function _modGroupsCheckAllowedSubscribeAdd(&$aDataEntry, $isPerformAction = false)
  21. {
  22. return parent::_modProfileCheckAllowedSubscribeAdd($aDataEntry, $isPerformAction);
  23. }
  24. /**
  25. * Process Hash Tag
  26. *
  27. * @param string $sHashtag - hashtag to be processed.
  28. * @param string $sModuleName - module name.
  29. * @param integer $iContentId - ID of the content which has the hashtag.
  30. * @param integer $iAuthorId - action's author id.
  31. */
  32. function processHashtag($sHashtag, $sModuleName, $iContentId, $iAuthorId = 0)
  33. {
  34. $CNF = &$this->_oConfig->CNF;
  35. /*
  36. * Note! For now metatag object name is used here as module name, because usually it's equal to module's name. This should be changed in Ticket #1596
  37. * For now if module cannot be created then a channel for such tag shouldn't be created too.
  38. */
  39. $oModule = BxDolModule::getInstance($sModuleName);
  40. if(empty($oModule) && $sModuleName != 'sys_cmts')
  41. return;
  42. /*
  43. * Use content's author profile when Author ID wasn't provided.
  44. * Usually it happens when tags were processed with cron.
  45. */
  46. if(empty($iAuthorId))
  47. $iAuthorId = BxDolService::call($sModuleName, 'get_author', array($iContentId));
  48. $aCheck = checkActionModule($iAuthorId, 'create channel auto', $this->getName(), false);
  49. $mixedCnlId = $this->_oDb->getChannelIdByName($sHashtag);
  50. if(empty($mixedCnlId) && ($aCheck[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED)) {
  51. $iProfileId = (int)$this->_oDb->getParam($CNF['PARAM_DEFAULT_AUTHOR']);
  52. if(empty($iProfileId)) {
  53. $aOperators = BxDolAccountQuery::getInstance()->getOperators();
  54. if(count($aOperators) > 0)
  55. $iProfileId = BxDolProfile::getInstanceByAccount(array_shift($aOperators))->id();
  56. }
  57. $aContent = $this->serviceEntityAdd($iProfileId, array($CNF['FIELD_NAME'] => $sHashtag, $CNF['FIELD_CF'] => 1));
  58. checkActionModule($iAuthorId, 'create channel auto', $this->getName(), true);
  59. if(isset($aContent['content']) && isset($aContent['content']['id']))
  60. $mixedCnlId = $aContent['content']['id'];
  61. }
  62. if(empty($mixedCnlId) || (int)$this->_oDb->checkContentInChannel($iContentId, $mixedCnlId, $sModuleName, $iAuthorId) != 0)
  63. return;
  64. $iId = (int)$this->_oDb->addContentToChannel($iContentId, $mixedCnlId, $sModuleName, $iAuthorId);
  65. if($iId == 0)
  66. return;
  67. $oCnlProfile = BxDolProfile::getInstanceByContentAndType($mixedCnlId, $this->_oConfig->getName());
  68. if(!$oCnlProfile)
  69. return;
  70. $iCnlProfileId = $oCnlProfile->id();
  71. bx_alert($this->_aModule['name'], 'hashtag_added', $iId, $iCnlProfileId, array(
  72. 'object_author_id' => $iAuthorId,
  73. 'privacy_view' => -$iCnlProfileId,
  74. 'subobject_id' => $iId,
  75. 'content_module' => $sModuleName,
  76. 'content_id' => $iContentId,
  77. 'content_author_id' => $iAuthorId,
  78. 'timeline_group' => array(
  79. 'by' => $sModuleName . '_' . $iAuthorId . '_' . $iContentId,
  80. 'field' => 'owner_id'
  81. )
  82. ));
  83. $aParams = array(
  84. 'object_author_id' => $iAuthorId,
  85. 'privacy_view' => -$iCnlProfileId,
  86. 'subobject_id' => $iId,
  87. 'content_module' => $sModuleName,
  88. 'content_id' => $iContentId,
  89. 'content_author_id' => $iAuthorId
  90. );
  91. bx_alert('system', 'prepare_alert_params', 0, 0, array('unit'=> $this->_aModule['name'], 'action' => 'hashtag_added_notif', 'object_id' => $mixedCnlId, 'sender_id' => $iCnlProfileId, 'extras' => &$aParams));
  92. bx_alert($this->_aModule['name'], 'hashtag_added_notif', $mixedCnlId, $iCnlProfileId, $aParams);
  93. }
  94. function removeContentFromChannel($iContentId, $sModuleName)
  95. {
  96. $oDolProfileQuery = BxDolProfileQuery::getInstance();
  97. $aData = $this->_oDb->getDataByContent($iContentId, $sModuleName);
  98. foreach ($aData as $aRow) {
  99. $iProfileInfo = $oDolProfileQuery->getProfileByContentAndType($aRow['cnl_id'], $this->_aModule['name']);
  100. if(is_array($iProfileInfo)){
  101. bx_alert($this->_aModule['name'], 'hashtag_deleted', $aRow['id'], $iProfileInfo['id']);
  102. bx_alert($this->_aModule['name'], 'hashtag_deleted_notif', $aRow['cnl_id'], $iProfileInfo['id'], array('subobject_id' => $aRow['id']));
  103. }
  104. }
  105. return $this->_oDb->removeContentFromChannel($iContentId, $sModuleName);
  106. }
  107. public function serviceGetSafeServices()
  108. {
  109. $a = parent::serviceGetSafeServices();
  110. unset($a['GetCreatePostForm']);
  111. unset($a['EntityCreate']);
  112. return array_merge($a, array (
  113. 'EntityBreadcrumb' => '',
  114. 'EntityParent' => '',
  115. 'EntityChilds' => '',
  116. 'SearchResultByHashtag' => '',
  117. ));
  118. }
  119. public function serviceGetWidgetNotices()
  120. {
  121. $CNF = &$this->_oConfig->CNF;
  122. $iResult = 0;
  123. if(empty($this->_oDb->getParam($CNF['PARAM_DEFAULT_AUTHOR'])))
  124. $iResult += 1;
  125. return $iResult;
  126. }
  127. public function serviceGetOptionsDefaultAuthor()
  128. {
  129. $aResult = array(
  130. array('key' => '', 'value' => _t('_Select_one'))
  131. );
  132. $aAccountsIds = BxDolAccountQuery::getInstance()->getOperators();
  133. foreach($aAccountsIds as $iAccountId) {
  134. $aProfilesIds = BxDolAccount::getInstance($iAccountId)->getProfilesIds();
  135. foreach($aProfilesIds as $iProfileId)
  136. $aResult[] = array(
  137. 'key' => $iProfileId,
  138. 'value' => BxDolProfile::getInstance($iProfileId)->getDisplayName()
  139. );
  140. }
  141. return $aResult;
  142. }
  143. /**
  144. * @page service Service Calls
  145. * @section bx_channels Channels
  146. * @subsection bx_channels-page_blocks Page Blocks
  147. * @subsubsection bx_channels-entity_breadcrumb entity_breadcrumb
  148. *
  149. * @code bx_srv('bx_channels', 'entity_breadcrumb', [...]); @endcode
  150. *
  151. * Display channel breadcrumb
  152. * @param $iContentId channel content ID
  153. *
  154. * @see BxCnlModule::serviceEntityBreadcrumb
  155. */
  156. /**
  157. * @ref bx_channels-entity_breadcrumb "entity_breadcrumb"
  158. */
  159. public function serviceEntityBreadcrumb($iContentId = 0)
  160. {
  161. if(!$iContentId)
  162. $iContentId = bx_process_input(bx_get('id'), BX_DATA_INT);
  163. if(!$iContentId)
  164. return false;
  165. $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
  166. if(!$aContentInfo)
  167. return false;
  168. return $this->_oTemplate->entryBreadcrumb($aContentInfo);
  169. }
  170. /**
  171. * @page service Service Calls
  172. * @section bx_channels Channels
  173. * @subsection bx_channels-page_blocks Page Blocks
  174. * @subsubsection bx_channels-entity_parent entity_parent
  175. *
  176. * @code bx_srv('bx_channels', 'entity_parent', [...]); @endcode
  177. *
  178. * Display block with parent channel
  179. * @param $iContentId channel content ID
  180. *
  181. * @see BxCnlModule::serviceEntityParent
  182. */
  183. /**
  184. * @ref bx_channels-entity_parent "entity_parent"
  185. */
  186. public function serviceEntityParent($iContentId = 0)
  187. {
  188. return $this->_serviceTemplateFunc('entryParent', $iContentId);
  189. }
  190. /**
  191. * @page service Service Calls
  192. * @section bx_channels Channels
  193. * @subsection bx_channels-page_blocks Page Blocks
  194. * @subsubsection bx_channels-entity_childs entity_childs
  195. *
  196. * @code bx_srv('bx_channels', 'entity_childs', [...]); @endcode
  197. *
  198. * Display block with child channels
  199. * @param $iContentId channel content ID
  200. *
  201. * @see BxCnlModule::serviceEntityChilds
  202. */
  203. /**
  204. * @ref bx_channels-entity_childs "entity_childs"
  205. */
  206. public function serviceEntityChilds($iContentId = 0)
  207. {
  208. return $this->_serviceTemplateFunc('entryChilds', $iContentId);
  209. }
  210. /**
  211. * @page service Service Calls
  212. * @section bx_channels Channels
  213. * @subsection bx_channels-page_blocks Page Blocks
  214. * @subsubsection bx_channels-search_result_by_hashtag search_result_by_hashtag
  215. *
  216. * @code bx_srv('bx_channels', 'search_result_by_hashtag', [...]); @endcode
  217. *
  218. * Display search results by hashtag for particular channel
  219. * @param $iContentId channel content ID
  220. *
  221. * @see BxCnlModule::serviceSearchResultByHashtag
  222. */
  223. /**
  224. * @ref bx_channels-search_result_by_hashtag "search_result_by_hashtag"
  225. */
  226. public function serviceSearchResultByHashtag($iContentId = 0)
  227. {
  228. $CNF = &$this->_oConfig->CNF;
  229. $oSearch = new BxTemplSearch();
  230. $oSearch->setLiveSearch(0);
  231. $oSearch->setMetaType('keyword');
  232. $aContentInfo = $this->_oDb->getContentInfoById(bx_get('id'));
  233. $_GET['keyword'] = $aContentInfo[$CNF['FIELD_NAME']];
  234. $sCode = $oSearch->response();
  235. if (!$sCode)
  236. $sCode = $oSearch->getEmptyResult();
  237. return $sCode;
  238. }
  239. /**
  240. * Data for Timeline module
  241. */
  242. public function serviceGetTimelineData()
  243. {
  244. $sModule = $this->_aModule['name'];
  245. return array(
  246. 'handlers' => array(
  247. array('group' => $sModule . '_hastag', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'hashtag_added', 'module_name' => $sModule, 'module_method' => 'get_timeline_post_hashtag', 'module_class' => 'Module', 'groupable' => 0, 'group_by' => ''),
  248. array('group' => $sModule . '_hastag', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'hashtag_deleted')
  249. ),
  250. 'alerts' => array(
  251. array('unit' => $sModule, 'action' => 'hashtag_added'),
  252. array('unit' => $sModule, 'action' => 'hashtag_deleted')
  253. )
  254. );
  255. }
  256. public function serviceGetTimelinePostAllowedView ($aEvent)
  257. {
  258. $sError = _t('_sys_txt_access_denied');
  259. if(empty($aEvent) || !is_array($aEvent))
  260. return $sError;
  261. $aEventContent = $this->_oDb->getContentById($aEvent['object_id']);
  262. if ($aEventContent['module_name'] == 'sys_cmts')
  263. return CHECK_ACTION_RESULT_ALLOWED;
  264. if(empty($aEventContent) || !is_array($aEventContent))
  265. return $sError;
  266. if(!BxDolRequest::serviceExists($aEventContent['module_name'], 'get_timeline_post_allowed_view'))
  267. return $sError;
  268. return BxDolService::call($aEventContent['module_name'], 'get_timeline_post_allowed_view', array(array('id' => $aEvent['id'], 'owner_id' => $aEventContent['author_id'], 'object_id' => $aEventContent['content_id'])));
  269. }
  270. public function serviceGetTimelinePostHashtag($aEvent, $aBrowseParams = [])
  271. {
  272. if(empty($aEvent) || !is_array($aEvent))
  273. return false;
  274. $aEventContent = $this->_oDb->getContentById($aEvent['object_id']);
  275. if(empty($aEventContent) || !is_array($aEventContent))
  276. return false;
  277. $sModule = $aEventContent['module_name'];
  278. $sClass = 'Module';
  279. if($sModule == 'sys_cmts') {
  280. $sModule = 'system';
  281. $sClass = 'TemplCmtsServices';
  282. }
  283. if(!BxDolRequest::serviceExists($sModule, 'get_timeline_post', $sClass))
  284. return false;
  285. $iContentId = (int)$aEventContent['content_id'];
  286. $iContentAuthor = 0;
  287. if(bx_is_srv($sModule, 'get_author', $sClass))
  288. $iContentAuthor = bx_srv($sModule, 'get_author', [$iContentId], $sClass);
  289. /**
  290. * Prepare fake event array (only mandatory parameters) to get
  291. * necessary data (related to an 'original' event with hashtag/label)
  292. * from associated content module.
  293. */
  294. $iOwnerId = $aEvent['owner_id'];
  295. $mixedObjectPrivacyView = BX_DOL_PG_ALL;
  296. if($iContentAuthor > 0) {
  297. $iOwnerId = (int)$aEventContent['author_id'];
  298. if(bx_is_srv($sModule, 'get_privacy_view', $sClass)) {
  299. $mixedAllowViewTo = bx_srv($sModule, 'get_privacy_view', [$iContentId]);
  300. if($mixedAllowViewTo !== false)
  301. $mixedObjectPrivacyView = $mixedAllowViewTo;
  302. if(is_numeric($mixedAllowViewTo) && (int)$mixedAllowViewTo < 0)
  303. $iOwnerId = abs($mixedAllowViewTo);
  304. }
  305. }
  306. $aResult = bx_srv($sModule, 'get_timeline_post', [[
  307. 'owner_id' => $iOwnerId,
  308. 'object_id' => $iContentId,
  309. 'object_privacy_view' => $mixedObjectPrivacyView
  310. ], $aBrowseParams], $sClass);
  311. if(empty($aResult) || !is_array($aResult))
  312. return $aResult;
  313. /**
  314. * Note. The context shouldn't be changed therefore
  315. * use input event's context (owner_id) in returned results.
  316. */
  317. return array_merge($aResult, [
  318. 'owner_id' => $aEvent['owner_id']
  319. ]);
  320. }
  321. /**
  322. * Data for Notifications module
  323. */
  324. public function serviceGetNotificationsData()
  325. {
  326. $a = parent::serviceGetNotificationsData();
  327. $sModule = $this->_aModule['name'];
  328. $a['handlers'][] = array('group' => $sModule . '_hastag_notif', 'type' => 'insert', 'alert_unit' => $sModule, 'alert_action' => 'hashtag_added_notif', 'module_name' => $sModule, 'module_method' => 'get_notifications_post_hashtag', 'module_class' => 'Module');
  329. $a['handlers'][] = array('group' => $sModule . '_hastag_notif', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'hashtag_deleted_notif');
  330. $a['settings'][] = array('group' => 'hastag', 'unit' => $sModule, 'action' => 'hashtag_added_notif', 'types' => array('follow_context'));
  331. $a['alerts'][] = array('unit' => $sModule, 'action' => 'hashtag_added_notif');
  332. $a['alerts'][] = array('unit' => $sModule, 'action' => 'hashtag_deleted_notif');
  333. return $a;
  334. }
  335. public function serviceGetNotificationsPostHashtag($aEvent)
  336. {
  337. if(empty($aEvent) || !is_array($aEvent))
  338. return '';
  339. $aContentEvent = $this->_oDb->getContentById($aEvent['subobject_id']);
  340. if(empty($aContentEvent) || !is_array($aContentEvent))
  341. return '';
  342. $oModule = BxDolModule::getInstance($aContentEvent['module_name']);
  343. if ($oModule) {
  344. if (isset($oModule->_oConfig->CNF['OBJECT_PRIVACY_VIEW'])){
  345. $oPrivacy = BxDolPrivacy::getObjectInstance($oModule->_oConfig->CNF['OBJECT_PRIVACY_VIEW']);
  346. if (!$oPrivacy->check($aContentEvent['content_id']))
  347. return '';
  348. }
  349. $aRv = $oModule->serviceGetNotificationsPost(array(
  350. 'object_id' => $aContentEvent['content_id']
  351. ));
  352. $aRv['lang_key'] = '_bx_channels_ntfs_txt_subobject_added';
  353. if(method_exists($oModule, 'serviceActAsProfile') && $oModule->serviceActAsProfile())
  354. $aRv['lang_key'] = '_bx_channels_ntfs_txt_subobject_added_profile';
  355. $aRv['entry_url'] = bx_absolute_url(str_replace(BX_DOL_URL_ROOT, '', $this->serviceGetLink($aContentEvent['cnl_id'])), '{bx_url_root}');
  356. return $aRv;
  357. }
  358. return '';
  359. }
  360. public function serviceBrowseByLevel ($iLevelId = 0, $bDisplayEmptyMsg = false)
  361. {
  362. return $this->_serviceBrowse ('level', array('level' => $iLevelId), BX_DB_PADDING_DEF, $bDisplayEmptyMsg);
  363. }
  364. public function serviceBrowseFollowed($iProfileId = 0, $aParams = array())
  365. {
  366. return $this->_serviceBrowseWithParam ('followed_entries', 'profile_id', $iProfileId, $aParams);
  367. }
  368. public function serviceBrowseAuthor($iProfileId = 0, $aParams = array())
  369. {
  370. $CNF = &$this->_oConfig->CNF;
  371. if(empty($iProfileId))
  372. $iProfileId = bx_get_logged_profile_id();
  373. $sResult = isset($aParams['empty_message']) && (bool)$aParams['empty_message'] === true ? MsgBox(_t('_Empty')) : '';
  374. $oConnection = BxDolConnection::getObjectInstance('sys_profiles_subscriptions');
  375. if(!$oConnection)
  376. return $sResult;
  377. $aProfiles = $oConnection->getConnectedContentByType($iProfileId, $this->getName());
  378. $aTmplVars = [];
  379. foreach ($aProfiles as $iProfileId) {
  380. $oProfile = BxDolProfile::getInstance($iProfileId);
  381. if(!$oProfile)
  382. continue;
  383. $aTmplVars[] = [
  384. 'unit' => $oProfile->getUnit(0, ['template' => 'unit_wo_cover'])
  385. ];
  386. }
  387. if(empty($aTmplVars) || !is_array($aTmplVars))
  388. return $sResult;
  389. return $this->_oTemplate->parseHtmlByName('my_channels.html', [
  390. 'bx_repeat:items' => $aTmplVars
  391. ]);
  392. }
  393. public function serviceDeleteProfileFromFansAndAdmins ($iProfileId)
  394. {
  395. return true;
  396. }
  397. public function serviceGetFollowingChannelsNames($iProfileId)
  398. {
  399. if (!($oConn = BxDolConnection::getObjectInstance('sys_profiles_subscriptions')))
  400. return array();
  401. if (!($aIds = $oConn->getConnectedContent($iProfileId)))
  402. return array();
  403. $a = array();
  404. foreach ($aIds as $iId) {
  405. if (!($oProfile = BxDolProfile::getInstance($iId)))
  406. continue;
  407. if ($oProfile->getModule() != $this->getName())
  408. continue;
  409. $a[] = $oProfile->getDisplayName();
  410. }
  411. return $a;
  412. }
  413. public function checkAllowedCompose(&$aDataEntry, $isPerformAction = false)
  414. {
  415. return _t('_sys_txt_access_denied');
  416. }
  417. public function checkAllowedContact($aDataEntry, $isPerformAction = false)
  418. {
  419. return _t('_sys_txt_access_denied');
  420. }
  421. public function followLabels($sModule, $iContentId)
  422. {
  423. if (!getParam('bx_channels_labels_autofollow'))
  424. return;
  425. if (!($oModuleProfiles = BxDolModule::getInstance($sModule)))
  426. return;
  427. if (!($aContentInfo = $oModuleProfiles->_oDb->getContentInfoById($iContentId)) || !($oProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $sModule)))
  428. return;
  429. $CNF = &$oModuleProfiles->_oConfig->CNF;
  430. if (!$oModuleProfiles->serviceActAsProfile() || !isset($CNF['FIELD_LABELS']) || empty($aContentInfo[$CNF['FIELD_ID']]))
  431. return;
  432. if (!($oMetatags = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS'])) || !$oMetatags->keywordsIsEnabled() || !($aLabels = $oMetatags->keywordsGet($aContentInfo[$CNF['FIELD_ID']])))
  433. return;
  434. if (!($oConn = BxDolConnection::getObjectInstance('sys_profiles_subscriptions')))
  435. return;
  436. foreach ($aLabels as $sLabel) {
  437. if (!($iContentIdChannel = $this->_oDb->getChannelIdByName($sLabel)))
  438. continue;
  439. if (!($oProfileChannel = BxDolProfile::getInstanceByContentAndType($iContentIdChannel, 'bx_channels')))
  440. continue;
  441. $oConn->addConnection($oProfile->id(), $oProfileChannel->id());
  442. }
  443. }
  444. /** Returns profile's subscribed channels React Jot
  445. *
  446. * @param int $iProfileId
  447. * @param array $aParams
  448. * @return array
  449. */
  450. public function serviceBrowseAuthorChannels($iProfileId = 0, $aParams = array())
  451. {
  452. $CNF = &$this->_oConfig->CNF;
  453. if(empty($iProfileId))
  454. $iProfileId = bx_get_logged_profile_id();
  455. $oConnection = BxDolConnection::getObjectInstance('sys_profiles_subscriptions');
  456. $aProfile = $oConnection->getConnectedContent($iProfileId);
  457. $aVars = array();
  458. foreach ($aProfile as $iProfileId) {
  459. $oProfile = BxDolProfile::getInstance($iProfileId);
  460. if (!$oProfile || $oProfile->getModule() != $this->getName())
  461. continue;
  462. $iContentId = $oProfile->getContentId();
  463. $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
  464. if (isset($aContentInfo[$CNF['FIELD_NAME']]))
  465. array_push($aVars, array(
  466. 'title' => $aContentInfo[$CNF['FIELD_NAME']],
  467. 'link' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iContentId)),
  468. 'followers' => $oConnection -> getConnectedInitiatorsCount($iProfileId),
  469. 'id' => $iProfileId,
  470. 'icon' => $oProfile -> getThumb()
  471. ));
  472. }
  473. return $aVars;
  474. }
  475. }
  476. /** @} */