Просмотр исходного кода

Ticket #5465 - Contexts: Create post form should check if context is Private.

AntonLV 5 месяцев назад
Родитель
Сommit
32186adfac
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      modules/boonex/timeline/classes/BxTimelineModule.php

+ 7 - 0
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -1717,6 +1717,13 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
             return '';
 
         $iProfileId = $this->getProfileId();
+
+        if($this->_bIsApi && ($aParams = bx_get('params')) !== false) {
+            $iContextId = (int)($aParams['context_id'] ?? 0);
+            if($iContextId)
+                $iProfileId = abs($iContextId);
+        }
+
         $sType = BX_TIMELINE_TYPE_FEED;
         return $this->_getBlockPost($iProfileId, array(
             'type' => $sType,