BxCnlModule.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  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)
  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($this->_iProfileId, '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($this->_iProfileId, '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 = array())
  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. $sClass = 'TemplCmtsServices';
  281. $sModule = 'system';
  282. }
  283. if(!BxDolRequest::serviceExists($sModule, 'get_timeline_post', $sClass))
  284. return false;
  285. /**
  286. * Prepare fake event array (only mandatory parameters) to get
  287. * necessary data (related to an 'original' event with hashtag/label)
  288. * from associated content module.
  289. */
  290. $iOwnerId = (int)$aEventContent['author_id'];
  291. $iContentId = (int)$aEventContent['content_id'];
  292. $mixedObjectPrivacyView = BX_DOL_PG_ALL;
  293. if(BxDolRequest::serviceExists($sModule, 'get_privacy_view')) {
  294. $mixedAllowViewTo = BxDolService::call($sModule, 'get_privacy_view', array($iContentId));
  295. if($mixedAllowViewTo !== false)
  296. $mixedObjectPrivacyView = $mixedAllowViewTo;
  297. if(is_numeric($mixedAllowViewTo) && (int)$mixedAllowViewTo < 0)
  298. $iOwnerId = abs($mixedAllowViewTo);
  299. }
  300. $aResult = BxDolService::call($sModule, 'get_timeline_post', array(array(
  301. 'owner_id' => $iOwnerId,
  302. 'object_id' => $iContentId,
  303. 'object_privacy_view' => $mixedObjectPrivacyView
  304. ), $aBrowseParams), $sClass);
  305. if(empty($aResult) || !is_array($aResult))
  306. return $aResult;
  307. /**
  308. * Note. The context shouldn't be changed therefore
  309. * use input event's context (owner_id) in returned results.
  310. */
  311. return array_merge($aResult, array(
  312. 'owner_id' => $aEvent['owner_id']
  313. ));
  314. }
  315. /**
  316. * Data for Notifications module
  317. */
  318. public function serviceGetNotificationsData()
  319. {
  320. $a = parent::serviceGetNotificationsData();
  321. $sModule = $this->_aModule['name'];
  322. $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');
  323. $a['handlers'][] = array('group' => $sModule . '_hastag_notif', 'type' => 'delete', 'alert_unit' => $sModule, 'alert_action' => 'hashtag_deleted_notif');
  324. $a['settings'][] = array('group' => 'hastag', 'unit' => $sModule, 'action' => 'hashtag_added_notif', 'types' => array('follow_context'));
  325. $a['alerts'][] = array('unit' => $sModule, 'action' => 'hashtag_added_notif');
  326. $a['alerts'][] = array('unit' => $sModule, 'action' => 'hashtag_deleted_notif');
  327. return $a;
  328. }
  329. public function serviceGetNotificationsPostHashtag($aEvent)
  330. {
  331. if(empty($aEvent) || !is_array($aEvent))
  332. return '';
  333. $aContentEvent = $this->_oDb->getContentById($aEvent['subobject_id']);
  334. if(empty($aContentEvent) || !is_array($aContentEvent))
  335. return '';
  336. $oModule = BxDolModule::getInstance($aContentEvent['module_name']);
  337. if ($oModule) {
  338. if (isset($oModule->_oConfig->CNF['OBJECT_PRIVACY_VIEW'])){
  339. $oPrivacy = BxDolPrivacy::getObjectInstance($oModule->_oConfig->CNF['OBJECT_PRIVACY_VIEW']);
  340. if (!$oPrivacy->check($aContentEvent['content_id']))
  341. return '';
  342. }
  343. $aRv = $oModule->serviceGetNotificationsPost(array(
  344. 'object_id' => $aContentEvent['content_id']
  345. ));
  346. $aRv['lang_key'] = '_bx_channels_ntfs_txt_subobject_added';
  347. if(method_exists($oModule, 'serviceActAsProfile') && $oModule->serviceActAsProfile())
  348. $aRv['lang_key'] = '_bx_channels_ntfs_txt_subobject_added_profile';
  349. $aRv['entry_url'] = str_replace(BX_DOL_URL_ROOT, '{bx_url_root}', $this->serviceGetLink($aContentEvent['cnl_id']));
  350. return $aRv;
  351. }
  352. return '';
  353. }
  354. public function serviceBrowseByLevel ($iLevelId = 0, $bDisplayEmptyMsg = false)
  355. {
  356. return $this->_serviceBrowse ('level', array('level' => $iLevelId), BX_DB_PADDING_DEF, $bDisplayEmptyMsg);
  357. }
  358. public function serviceBrowseFollowed($iProfileId = 0, $aParams = array())
  359. {
  360. return $this->_serviceBrowseWithParam ('followed_entries', 'profile_id', $iProfileId, $aParams);
  361. }
  362. public function serviceBrowseAuthor($iProfileId = 0, $aParams = array())
  363. {
  364. $CNF = &$this->_oConfig->CNF;
  365. if(empty($iProfileId))
  366. $iProfileId = bx_get_logged_profile_id();
  367. $sResult = isset($aParams['empty_message']) && (bool)$aParams['empty_message'] === true ? MsgBox(_t('_Empty')) : '';
  368. $oConnection = BxDolConnection::getObjectInstance('sys_profiles_subscriptions');
  369. if(!$oConnection)
  370. return $sResult;
  371. $aProfiles = $oConnection->getConnectedContentByType($iProfileId, $this->getName());
  372. $aTmplVars = [];
  373. foreach ($aProfiles as $iProfileId) {
  374. $oProfile = BxDolProfile::getInstance($iProfileId);
  375. if(!$oProfile)
  376. continue;
  377. $aTmplVars[] = [
  378. 'unit' => $oProfile->getUnit(0, ['template' => 'unit_wo_cover'])
  379. ];
  380. }
  381. if(empty($aTmplVars) || !is_array($aTmplVars))
  382. return $sResult;
  383. return $this->_oTemplate->parseHtmlByName('my_channels.html', [
  384. 'bx_repeat:items' => $aTmplVars
  385. ]);
  386. }
  387. public function serviceDeleteProfileFromFansAndAdmins ($iProfileId)
  388. {
  389. return true;
  390. }
  391. public function serviceGetFollowingChannelsNames($iProfileId)
  392. {
  393. if (!($oConn = BxDolConnection::getObjectInstance('sys_profiles_subscriptions')))
  394. return array();
  395. if (!($aIds = $oConn->getConnectedContent($iProfileId)))
  396. return array();
  397. $a = array();
  398. foreach ($aIds as $iId) {
  399. if (!($oProfile = BxDolProfile::getInstance($iId)))
  400. continue;
  401. if ($oProfile->getModule() != $this->getName())
  402. continue;
  403. $a[] = $oProfile->getDisplayName();
  404. }
  405. return $a;
  406. }
  407. public function checkAllowedCompose(&$aDataEntry, $isPerformAction = false)
  408. {
  409. return _t('_sys_txt_access_denied');
  410. }
  411. public function checkAllowedContact($aDataEntry, $isPerformAction = false)
  412. {
  413. return _t('_sys_txt_access_denied');
  414. }
  415. public function followLabels($sModule, $iContentId)
  416. {
  417. if (!getParam('bx_channels_labels_autofollow'))
  418. return;
  419. if (!($oModuleProfiles = BxDolModule::getInstance($sModule)))
  420. return;
  421. if (!($aContentInfo = $oModuleProfiles->_oDb->getContentInfoById($iContentId)) || !($oProfile = BxDolProfile::getInstanceByContentAndType($iContentId, $sModule)))
  422. return;
  423. $CNF = &$oModuleProfiles->_oConfig->CNF;
  424. if (!$oModuleProfiles->serviceActAsProfile() || !isset($CNF['FIELD_LABELS']) || empty($aContentInfo[$CNF['FIELD_ID']]))
  425. return;
  426. if (!($oMetatags = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS'])) || !$oMetatags->keywordsIsEnabled() || !($aLabels = $oMetatags->keywordsGet($aContentInfo[$CNF['FIELD_ID']])))
  427. return;
  428. if (!($oConn = BxDolConnection::getObjectInstance('sys_profiles_subscriptions')))
  429. return;
  430. foreach ($aLabels as $sLabel) {
  431. if (!($iContentIdChannel = $this->_oDb->getChannelIdByName($sLabel)))
  432. continue;
  433. if (!($oProfileChannel = BxDolProfile::getInstanceByContentAndType($iContentIdChannel, 'bx_channels')))
  434. continue;
  435. $oConn->addConnection($oProfile->id(), $oProfileChannel->id());
  436. }
  437. }
  438. /** Returns profile's subscribed channels React Jot
  439. *
  440. * @param int $iProfileId
  441. * @param array $aParams
  442. * @return array
  443. */
  444. public function serviceBrowseAuthorChannels($iProfileId = 0, $aParams = array())
  445. {
  446. $CNF = &$this->_oConfig->CNF;
  447. if(empty($iProfileId))
  448. $iProfileId = bx_get_logged_profile_id();
  449. $oConnection = BxDolConnection::getObjectInstance('sys_profiles_subscriptions');
  450. $aProfile = $oConnection->getConnectedContent($iProfileId);
  451. $aVars = array();
  452. foreach ($aProfile as $iProfileId) {
  453. $oProfile = BxDolProfile::getInstance($iProfileId);
  454. if (!$oProfile || $oProfile->getModule() != $this->getName())
  455. continue;
  456. $iContentId = $oProfile->getContentId();
  457. $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
  458. if (isset($aContentInfo[$CNF['FIELD_NAME']]))
  459. array_push($aVars, array(
  460. 'title' => $aContentInfo[$CNF['FIELD_NAME']],
  461. 'link' => bx_absolute_url(BxDolPermalinks::getInstance()->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $iContentId)),
  462. 'followers' => $oConnection -> getConnectedInitiatorsCount($iProfileId),
  463. 'id' => $iProfileId,
  464. 'icon' => $oProfile -> getThumb()
  465. ));
  466. }
  467. return $aVars;
  468. }
  469. }
  470. /** @} */