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

Merge branch 'master' of https://github.com/unaio/una

AntonLV 2 лет назад
Родитель
Сommit
b9fba76a86
33 измененных файлов с 908 добавлено и 12 удалено
  1. 25 0
      inc/classes/BxDolCover.php
  2. 15 0
      inc/classes/BxDolEmailTemplates.php
  3. 26 0
      inc/classes/BxDolFeature.php
  4. 11 1
      inc/classes/BxDolInformer.php
  5. 33 0
      inc/classes/BxDolLabel.php
  6. 44 0
      inc/classes/BxDolMetatags.php
  7. 13 1
      inc/classes/BxDolMetatagsQuery.php
  8. 4 0
      inc/classes/BxDolPermalinks.php
  9. 31 1
      inc/classes/BxDolPrivacy.php
  10. 79 3
      inc/classes/BxDolProfile.php
  11. 11 0
      inc/classes/BxDolPush.php
  12. 5 0
      inc/classes/BxDolRelation.php
  13. 39 0
      inc/classes/BxDolSearch.php
  14. 12 0
      inc/classes/BxDolSearchExtended.php
  15. 62 0
      inc/classes/BxDolTemplate.php
  16. 27 0
      inc/classes/BxDolTranscoder.php
  17. 27 0
      inc/classes/BxDolVote.php
  18. 29 0
      modules/boonex/albums/classes/BxAlbumsFormEntry.php
  19. 15 0
      modules/boonex/albums/classes/BxAlbumsModule.php
  20. 40 1
      modules/boonex/analytics/classes/BxAnalyticsModule.php
  21. 53 0
      modules/boonex/channels/classes/BxCnlModule.php
  22. 27 0
      modules/boonex/convos/classes/BxCnvFormEntry.php
  23. 8 1
      modules/boonex/convos/classes/BxCnvFormsEntryHelper.php
  24. 40 0
      modules/boonex/events/classes/BxEventsModule.php
  25. 88 0
      modules/boonex/feedback/classes/BxFdbModule.php
  26. 29 3
      modules/boonex/invites/classes/BxInvModule.php
  27. 13 0
      modules/boonex/invites/classes/BxInvResponse.php
  28. 10 0
      modules/boonex/market/classes/BxMarketCronPruning.php
  29. 10 0
      modules/boonex/market/classes/BxMarketGridLicensesAdministration.php
  30. 20 0
      modules/boonex/smtpmailer/classes/BxSMTPModule.php
  31. 12 0
      modules/boonex/stream/classes/BxStrmModule.php
  32. 24 0
      modules/boonex/tasks/classes/BxTasksFormEntry.php
  33. 26 1
      modules/boonex/tasks/classes/BxTasksModule.php

+ 25 - 0
inc/classes/BxDolCover.php

@@ -136,6 +136,19 @@ class BxDolCover extends BxDolFactory implements iBxDolSingleton
         if (false !== $sTemplateName)
             $this->_sTemplateName = $sTemplateName;
 
+         /**
+         * @hooks
+         * @hookdef hook-system-set_cover 'system', 'set_cover' - hook in set cover 
+         * - $unit_name - equals `account`
+         * - $action - equals `set_cover` 
+         * - $object_id - not used
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `options` - [array] by ref, cover options, default template supports the following: title, can be overridden in hook processing
+         *      - `override_result` - [string] by ref, template name, can be overridden in hook processing
+         *      - `cover` - [object] object cover
+         * @hook @ref hook-system-set_cover
+         */
         bx_alert('system', 'set_cover', 0, false, array('options' => &$this->_aOptions, 'template_name' => &$this->_sTemplateName, 'cover' => $this));
     }
 
@@ -158,6 +171,18 @@ class BxDolCover extends BxDolFactory implements iBxDolSingleton
         if(!$this->_sCoverImageUrl)
             return false;
 
+        /**
+         * @hooks
+         * @hookdef hook-system-set_cover 'system', 'set_cover_image' - hook on cover image
+         * - $unit_name - equals `system`
+         * - $action - equals `set_cover_image` 
+         * - $object_id - not used
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `cover_image` - [string] by ref, cover image url, or array with file id and storage or transcoder object, can be overridden in hook processing
+         *      - `cover` - [object] object cover
+         * @hook @ref hook-system-set_cover_image
+         */
         bx_alert('system', 'set_cover_image', 0, false, array('cover_image' => &$this->_sCoverImageUrl, 'cover' => $this));
 
         return true;

+ 15 - 0
inc/classes/BxDolEmailTemplates.php

@@ -129,6 +129,21 @@ class BxDolEmailTemplates extends BxDolFactory implements iBxDolSingleton
     {
         $aTemplate = $this->getTemplate($sTemplateName, $iAccountId);
         
+        /**
+         * @hooks
+         * @hookdef hook-system-parse_email_template 'system', 'parse_email_template' - hook on template with neccessary markers replaced
+         * - $unit_name - equals `system`
+         * - $action - equals `parse_email_template` 
+         * - $object_id - not used
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `template_name` - [string] by ref, name of necessary template, can be overridden in hook processing
+         *      - `template_keys` - [array] by ref, key ane value pairs to replace in subject and body, can be overridden in hook processing
+         *      - `account_id` - [int] by ref, account ID of registered member, can be overridden in hook processing
+         *      - `profile_id` - [int] by ref, profile ID of registered member, can be overridden in hook processing
+         *      - `template` - [array] by ref, template, can be overridden in hook processing
+         * @hook @ref hook-system-parse_email_template
+         */
         bx_alert('system', 'parse_email_template', 0, 0, array('template_name' => &$sTemplateName, 'template_keys' => &$aTemplateKeys, 'account_id' => &$iAccountId, 'profile_id' => &$iProfileId, 'template' => &$aTemplate));
         
         if (!$aTemplate)

+ 26 - 0
inc/classes/BxDolFeature.php

@@ -176,6 +176,32 @@ class BxDolFeature extends BxDolObject
         );
 
         bx_alert($this->_sSystem, ($bPerformUndo ? 'un' : '') . 'feature', $iObjectId, $iAuthorId, array('object_author_id' => $iObjectAuthorId));
+        /**
+         * @hooks
+         * @hookdef hook-feature-undo 'feature', 'undo' - hook on cancel feature 
+         * - $unit_name - equals `feature`
+         * - $action - equals `undo` 
+         * - $object_id - report id 
+         * - $sender_id - profile_id for feature's author
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_system` - [string] system name, ex: bx_posts
+         *      - `object_id` - [int] feature object id 
+         *      - `object_author_id` - [int] author's profile_id for feature object_id 
+         * @hook @ref hook-feature-undo
+         */
+        /**
+         * @hooks
+         * @hookdef hook-feature-do 'feature', 'do' - hook on feature 
+         * - $unit_name - equals `feature`
+         * - $action - equals `do` 
+         * - $object_id - report id 
+         * - $sender_id - profile_id for feature's author
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_system` - [string] system name, ex: bx_posts
+         *      - `object_id` - [int] feature object id 
+         *      - `object_author_id` - [int] author's profile_id for feature object_id 
+         * @hook @ref hook-feature-do
+         */
         bx_alert('feature', ($bPerformUndo ? 'un' : '') . 'do', 0, $iAuthorId, array('object_system' => $this->_sSystem, 'object_id' => $iObjectId, 'object_author_id' => $iObjectAuthorId));
 
         return array(

+ 11 - 1
inc/classes/BxDolInformer.php

@@ -126,7 +126,17 @@ class BxDolInformer extends BxDolFactory implements iBxDolSingleton
                 $oProfile->addInformerPermanentMessages($this);
         }
 
-        // add permament messages from modules
+        /**
+         * @hooks
+         * @hookdef hook-system-informer_permament_messages 'system', 'informer_permament_messages' - hook on informer
+         * - $unit_name - equals `system`
+         * - $action - equals `informer_permament_messages` 
+         * - $object_id - label id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `informer` - [object] object with informer
+         * @hook @ref hook-system-informer_permament_messages
+         */
         bx_alert('system', 'informer_permament_messages', 0, false, array('informer' => $this));
     }
 

+ 33 - 0
inc/classes/BxDolLabel.php

@@ -139,6 +139,17 @@ class BxDolLabel extends BxDolFactory implements iBxDolSingleton
         if(empty($aLabel) || !is_array($aLabel))
             return;
 
+        /**
+         * @hooks
+         * @hookdef hook-label-edited 'label', 'added' - hook on new label added
+         * - $unit_name - equals `label`
+         * - $action - equals `added` 
+         * - $object_id - label id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `label` - [array] array with label info
+         * @hook @ref hook-label-added
+         */
         bx_alert('label', 'added', $iId, false, array('label' => $aLabel));
     }
 
@@ -148,6 +159,17 @@ class BxDolLabel extends BxDolFactory implements iBxDolSingleton
         if(empty($aLabel) || !is_array($aLabel))
             return;
 
+        /**
+         * @hooks
+         * @hookdef hook-label-edited 'label', 'edited' - hook on new label edited
+         * - $unit_name - equals `label`
+         * - $action - equals `edited` 
+         * - $object_id - label id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `label` - [array] array with label info
+         * @hook @ref hook-label-edited
+         */
         bx_alert('label', 'edited', $iId, false, array('label' => $aLabel));
     }
 
@@ -157,6 +179,17 @@ class BxDolLabel extends BxDolFactory implements iBxDolSingleton
         if(empty($aLabel) || !is_array($aLabel))
             return;
 
+         /**
+         * @hooks
+         * @hookdef hook-label-deleted 'label', 'deleted' - hook on new label deleted
+         * - $unit_name - equals `label`
+         * - $action - equals `deleted` 
+         * - $object_id - label id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `label` - [array] array with label info
+         * @hook @ref hook-label-deleted
+         */
         bx_alert('label', 'deleted', $iId, false, array('label' => $aLabel));
     }
 

+ 44 - 0
inc/classes/BxDolMetatags.php

@@ -384,6 +384,7 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
         if ($iRet = $this->_oQuery->keywordsAdd($iId, array($s), $bDeletePreviousKeywords)) {
             $sSource = $this->_sObject . '_' . $iId;
 
+<<<<<<< HEAD
             /**
              * @hooks
              * @hookdef hook-bx_dol_metatags-keyword_added '{object_name}', 'keyword_added' - hook after a keyword (hashtag) was recognized in provided text
@@ -416,6 +417,24 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
                 'object' => $this->_sObject, 
                 'source' => $sSource
             ]);
+=======
+            bx_alert($this->_aObject['module'], 'keyword_added', $iId, bx_get_logged_profile_id(), array('meta' => $s, 'content_id' => $iId, 'source' => $sSource));
+            /**
+             * @hooks
+             * @hookdef hook-meta_keyword-added 'meta_keyword', 'added' - hook on new keyword added
+             * - $unit_name - equals `meta_keyword`
+             * - $action - equals `added` 
+             * - $object_id - meta keyword id
+             * - $sender_id - profile_id for current user 
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `meta` - [string] keyword
+             *      - `content_id` - [string] content id
+             *      - `object` - [string] object name
+             *      - `source` - [string] source
+             * @hook @ref hook-meta_keyword-added
+             */
+            bx_alert('meta_keyword', 'added', $iId, bx_get_logged_profile_id(), array('meta' => $s, 'content_id' => $iId, 'object' => $this->_sObject, 'source' => $sSource));
+>>>>>>> 2d79728c96ec4de3e5c6c11f8892e10bbb4c55e7
         }
 
         return $iRet;
@@ -521,6 +540,7 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
         }
         
         $sUrl = BX_DOL_URL_ROOT . 'searchKeyword.php?type=keyword&keyword=' . rawurlencode($sKeyword) . $sSectionPart;
+<<<<<<< HEAD
         
         /**
          * @hooks
@@ -545,6 +565,30 @@ class BxDolMetatags extends BxDolFactory implements iBxDolFactoryObject
             'section' => $mixedSection,
             'sObject' => $this->_sObject, //depricated, will be removed in future versions, approximately in UNA 15.
         ]);
+=======
+        /**
+         * @hooks
+         * @hookdef hook-meta_keyword-url 'meta_keyword', 'url' - hook on get URL for hashtags
+         * - $unit_name - equals `meta_keyword`
+         * - $action - equals `url` 
+         * - $object_id - not used
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `url` - [string] by ref, url for hashtag
+         *      - `keyword` - [string] hashtag
+         *      - `id` - [int] hashtag id
+         *      - `sObject` - [string] object name
+         *      - `section` - [string] section name
+         * @hook @ref hook-meta_keyword-url
+         */
+        bx_alert('meta_keyword', 'url', 0, false, array(
+           'url' => &$sUrl,
+           'keyword' => $sKeyword,
+		   'id' => $iId,
+           'sObject' => $this->_sObject,
+           'section' => $mixedSection,
+        ));
+>>>>>>> 2d79728c96ec4de3e5c6c11f8892e10bbb4c55e7
     
         return bx_is_api() ? bx_api_get_relative_url($sUrl) : $sUrl;
     }

+ 13 - 1
inc/classes/BxDolMetatagsQuery.php

@@ -67,8 +67,20 @@ class BxDolMetatagsQuery extends BxDolDb
     public function keywordsDelete($mixedContentId)
     {
         $mixedResult = $this->metaDelete($this->_aObject['table_keywords'], $mixedContentId);
-        if ($mixedResult != false)
+        if ($mixedResult != false){
+             /**
+             * @hooks
+             * @hookdef hook-meta_keyword-deleted 'meta_keyword', 'deleted' - hook on delete meta keyword
+             * - $unit_name - equals `meta_keyword`
+             * - $action - equals `deleted` 
+             * - $object_id - content_id
+             * - $sender_id - profile_id fror logged user
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `object` - [string] object name
+             * @hook @ref hook-meta_keyword-deleted
+             */
             bx_alert('meta_keyword', 'deleted', $mixedContentId, bx_get_logged_profile_id(), array('object' => $this->_aObject['object']));
+        }
         return $mixedResult;
     }
 

+ 4 - 0
inc/classes/BxDolPermalinks.php

@@ -224,6 +224,7 @@ class BxDolPermalinks extends BxDolDb implements iBxDolSingleton
     {
         $sRet = null;
         
+<<<<<<< HEAD
         /**
          * @hooks
          * @hookdef hook-system-unpermalink 'system', 'unpermalink' - hook to override link during permalink to link conversion
@@ -242,6 +243,9 @@ class BxDolPermalinks extends BxDolDb implements iBxDolSingleton
             'strip_base_url' => $isStripBaseUrl, 
             'return_data' => &$sRet
         ]);
+=======
+        bx_alert('system', 'unpermalink', 0, 0, array('link' => $sLink, 'strip_base_url' => $isStripBaseUrl, 'return_data' => &$sRet));
+>>>>>>> 2d79728c96ec4de3e5c6c11f8892e10bbb4c55e7
         if (null !== $sRet)
             return $sRet;
 

+ 31 - 1
inc/classes/BxDolPrivacy.php

@@ -521,7 +521,22 @@ class BxDolPrivacy extends BxDolFactory implements iBxDolFactoryObject
                     'table' => $this->_aObject['table'],
                 ),
             ),
-        );      
+        );   
+         /**
+         * @hooks
+         * @hookdef hook-system-privacy_condition 'system', 'privacy_condition' - hook on get necessary condition array to use privacy in search classes
+         * - $unit_name - equals `profile`
+         * - $action - equals `privacy_condition` 
+         * - $object_id - not used
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `group_id` - [int] group ID or array of group IDs
+         *      - `field` - [string] field name
+         *      - `object` - [array] array with object privacy 
+         *      - `privacy_object` - [array] object privacy 
+         *      - `result` - [bool] by ref, on success return true otherwise false, can be overridden in hook processing
+         * @hook @ref hook-system-privacy_condition
+         */
         bx_alert('system', 'privacy_condition', 0, false, array(
             'group_id' => $mixedGroupId,
             'field' => $this->convertActionToField($this->_aObject['action']),
@@ -598,6 +613,21 @@ class BxDolPrivacy extends BxDolFactory implements iBxDolFactoryObject
     {
         $aObject = $this->getObjectInfo($this->convertActionToField($this->_aObject['action']), $iObjectId);
         $bRv = $this->_check($iObjectId, $iViewerId, $aObject);
+        /**
+         * @hooks
+         * @hookdef hook-system-check_privacy 'system', 'check_privacy' - check privacy for object
+         * - $unit_name - equals `profile`
+         * - $action - equals `check_privacy` 
+         * - $object_id - not used
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_id` - [int] object id
+         *      - `viewer_id` - [int] profile_id for viewer
+         *      - `object` - [array] object privacy 
+         *      - `object_privacy` - [array] arry with object privacy 
+         *      - `result` - [bool] by ref, on success return true otherwise false, can be overridden in hook processing
+         * @hook @ref hook-system-check_privacy
+         */
         bx_alert('system', 'check_privacy', 0, 0, array(
            'object_id' => $iObjectId,
            'viewer_id' => $iViewerId,

+ 79 - 3
inc/classes/BxDolProfile.php

@@ -310,6 +310,18 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
     {
         $aInfo = $this->getInfo($iProfileId);
         $sDisplayName = BxDolService::call($aInfo['type'], 'profile_name', array($aInfo['content_id']));
+        /**
+         * @hooks
+         * @hookdef hook-profile-profile_name 'profile', 'profile_name' - hook on before profile deletion
+         * - $unit_name - equals `profile`
+         * - $action - equals `profile_name` 
+         * - $object_id - profile_id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `info` - [array] profile info
+         *      - `display_name` - [bool] by ref, display profile name, can be overridden in hook processing
+         * @hook @ref hook-profile-profile_name
+         */
         bx_alert('profile', 'profile_name', $iProfileId, 0, array('info' => $aInfo, 'display_name' => &$sDisplayName));
         return $sDisplayName;
     }
@@ -505,8 +517,20 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
         if (!$bForceDelete && $ID == $aAccountInfo['profile_id'])
             $oAccount->updateProfileContextAuto($ID);
 
-        // create system event before deletion
         $isStopDeletion = false;
+        /**
+         * @hooks
+         * @hookdef hook-profile-before_delete 'profile', 'before_delete' - hook on before profile deletion
+         * - $unit_name - equals `profile`
+         * - $action - equals `before_delete` 
+         * - $object_id - profile_id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `delete_with_content` - [bool] also delete content for profile or not
+         *      - `stop_deletion` - [bool] by ref, if true then stop profile deletion, can be overridden in hook processing
+         *      - `type` - [string] module name
+         * @hook @ref hook-profile-before_delete
+         */
         bx_alert('profile', 'before_delete', $ID, 0, array('delete_with_content' => $bDeleteWithContent, 'stop_deletion' => &$isStopDeletion, 'type' => $aProfileInfo['type']));
         if ($isStopDeletion)
             return false;
@@ -541,7 +565,18 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
         if (!$this->_oQuery->delete($ID))
             return false;
 
-        // create system event
+        /**
+         * @hooks
+         * @hookdef hook-profile-delete 'profile', 'delete' - hook on profile deleted
+         * - $unit_name - equals `profile`
+         * - $action - equals `delete` 
+         * - $object_id - profile_id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `delete_with_content` - [bool] also delete content for profile or not
+         *      - `type` - [string] module name
+         * @hook @ref hook-profile-delete
+         */
         bx_alert('profile', 'delete', $ID, 0, array('delete_with_content' => $bDeleteWithContent, 'type' => $aProfileInfo['type']));
 
         // unset class instance to prevent creating the instance again
@@ -565,6 +600,22 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
         $oQuery = BxDolProfileQuery::getInstance();
         if (!($iProfileId = $oQuery->insertProfile ($iAccountId, $iContentId, $sStatus, $sType)))
             return false;
+         /**
+         * @hooks
+         * @hookdef hook-profile-add 'profile', 'add' - hook on profile added
+         * - $unit_name - equals `profile`
+         * - $action - equals `add` 
+         * - $object_id - profile_id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `module` - [string] action id
+         *      - `content` - [int] content_id in module
+         *      - `account` - [int] account_id
+         *      - `status` - [string] status 
+         *      - `action` - [int] action id
+         *      - `profile_id` - [int] by ref, iprofile_id, can be overridden in hook processing
+         * @hook @ref hook-profile-add
+         */
         bx_alert('profile', 'add', $iProfileId, 0, array('module' => $sType, 'content' => $iContentId, 'account' => $iAccountId, 'status' => $sStatus, 'action' => $iAction, 'profile_id' => &$iProfileId));
         return $iProfileId;
     }
@@ -650,7 +701,19 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
 
         $this->_aProfile = array();
 
-        // alert about status changing
+        /**
+         * @hooks
+         * @hookdef hook-profile-approve 'profile', 'approve' - hook on switch profile
+         * - $unit_name - equals `profile`
+         * - $action - equals `approve` 
+         * - $object_id - profile_id for current user
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `action` - [int] action id
+         *      - `status` - [string] by ref, status, can be overridden in hook processing
+         *      - `send_email_notification` - [bool] by ref, if need to send notification about changed status = true, otherwise false, can be overridden in hook processing
+         * @hook @ref hook-profile-approve
+         */
         bx_alert('profile', $sAlertActionName, $iProfileId, false, array('action' => $iAction, 'status' => &$sStatus, 'send_email_notification' => &$bSendEmailNotification));
         
         $this->doAudit('_sys_audit_action_set_status_' . $sStatus);
@@ -689,6 +752,19 @@ class BxDolProfile extends BxDolFactory implements iBxDolProfile
         $iSwitchToAccountId = $this->getAccountId();
         $iSwitchToProfileId = $this->id();
         $bCanSwitch = ($iSwitchToAccountId == $iViewerAccountId || $bAllowSwitchToAnyProfile);
+        /**
+         * @hooks
+         * @hookdef hook-account-check_switch_context 'account', 'check_switch_context' - hook on switch profile
+         * - $unit_name - equals `account`
+         * - $action - equals `check_switch_context` 
+         * - $object_id - account id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `switch_to_profile` - [int] profile_id for switched profile
+         *      - `viewer_account` - [int] profile_id for viewer profile
+         *      - `override_result` - [bool] by ref, if allow to switch to profile = true, otherwise false, can be overridden in hook processing
+         * @hook @ref hook-account-check_switch_context
+         */
         bx_alert('account', 'check_switch_context', $iSwitchToAccountId, $iViewerProfileId, array('switch_to_profile' => $iSwitchToProfileId, 'viewer_account' => $iViewerAccountId, 'override_result' => &$bCanSwitch));
 
         if(!$bCanSwitch ||  $iViewerProfileId == $iSwitchToProfileId)

+ 11 - 0
inc/classes/BxDolPush.php

@@ -66,6 +66,17 @@ class BxDolPush extends BxDolFactory implements iBxDolSingleton
             'email_hash' => $sEmail ? hash_hmac('sha256', $sEmail, getParam('sys_push_app_id')) : '',
         );
 
+         /**
+         * @hooks
+         * @hookdef hook-system-is_confirmed 'system', 'push_tags' - hook on get tags to send to PUSH server
+         * - $unit_name - equals `system`
+         * - $action - equals `push_tags` 
+         * - $object_id - profile_id from current user
+         * - $sender_id - profile_id from current user
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `tags` - [array] by ref, array of tags, can be overridden in hook processing
+         * @hook @ref hook-system-push_tags
+         */
         bx_alert('system', 'push_tags', $iProfileId, $iProfileId, array('tags' => &$a));
 
         return $a;

+ 5 - 0
inc/classes/BxDolRelation.php

@@ -279,6 +279,7 @@ class BxDolRelation extends BxDolConnection
     {
         $aRelations = BxDolFormQuery::getDataItems($this->_sPreList, false, BX_DATA_VALUES_ALL);
 
+<<<<<<< HEAD
         /**
          * @hooks
          * @hookdef hook-bx_dol_relation-get_relations '{object_name}', 'get_relations' - hook to override relation info 
@@ -294,6 +295,10 @@ class BxDolRelation extends BxDolConnection
          * @hook @ref hook-bx_dol_relation-get_relations
          */
         bx_alert($this->_sObject, 'get_relations', 0, bx_get_logged_profile_id(), [
+=======
+        
+        bx_alert($this->_sObject, 'get_relations', 0, bx_get_logged_profile_id(), array(
+>>>>>>> 2d79728c96ec4de3e5c6c11f8892e10bbb4c55e7
             'initiator' => (int)$iInitiator,
             'content' => (int)$iContent,
             'pre_list' => $this->_sPreList,

+ 39 - 0
inc/classes/BxDolSearch.php

@@ -741,6 +741,18 @@ class BxDolSearchResult implements iBxDolReplaceable
      */
     function getSearchData ()
     {
+        /**
+         * @hooks
+         * @hookdef hook-simple_search-before_get_data 'simple_search', 'before_get_data' - hook on before after get data 
+         * - $unit_name - equals `simple_search`
+         * - $action - equals `before_get_data` 
+         * - $object_id - not used 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object` - [array] by ref, array of parameters, can be overridden in hook processing
+         *      - `mode` - [string] search mode
+         * @hook @ref hook-simple_search-before_get_data
+         */
         bx_alert('simple_search', 'before_get_data', 0, false, [
             'object' => &$this->aCurrent, 
             'mode' => $this->_sMode
@@ -758,6 +770,19 @@ class BxDolSearchResult implements iBxDolReplaceable
             $aData = sort($aIds) == sort($this->_aParams['validate']) ? 'valid' : 'invalid';
         }
 
+        /**
+         * @hooks
+         * @hookdef hook-simple_search-get_data 'simple_search', 'get_data' - hook on after get data 
+         * - $unit_name - equals `simple_search`
+         * - $action - equals `get_data` 
+         * - $object_id - not used 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object` - [array] by ref, array of parameters, can be overridden in hook processing
+         *      - `mode` - [string] search mode
+         *      - `search_object` - [string] search object name
+         * @hook @ref hook-simple_search-get_data
+         */
         bx_alert('simple_search', 'get_data', 0, false, [
             'object' => &$this->aCurrent, 
             'mode' => $this->_sMode, 
@@ -786,6 +811,20 @@ class BxDolSearchResult implements iBxDolReplaceable
         $this->setConditionParams();
         $aQuery = $this->getSearchDataByParams($aParams);
 
+        /**
+         * @hooks
+         * @hookdef hook-simple_search-get_query 'simple_search', 'get_query' - hook on get sql queries
+         * - $unit_name - equals `simple_search`
+         * - $action - equals `get_query` 
+         * - $object_id - not used 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object` - [array] by ref, array of parameters, can be overridden in hook processing
+         *      - `mode` - [string] search mode
+         *      - `search_object` - [string] search object name
+         *      - `search_query` - [array] by ref, array of sql, can be overridden in hook processing
+         * @hook @ref hook-simple_search-get_query
+         */
         bx_alert('simple_search', 'get_query', 0, false, [
             'object' => &$this->aCurrent, 
             'mode' => $this->_sMode, 

+ 12 - 0
inc/classes/BxDolSearchExtended.php

@@ -143,6 +143,18 @@ class BxDolSearchExtended extends BxDolFactory implements iBxDolFactoryObject
             }
         }
 
+        /**
+         * @hooks
+         * @hookdef hook-search-get_mention 'search', 'get_mention' - hook on get mention list
+         * - $unit_name - equals `search`
+         * - $action - equals `get_mention` 
+         * - $object_id - not used 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `params` - [array] array of parameters
+         *      - `override_result` - [array] by ref, array of colors, can be overridden in hook processing
+         * @hook @ref hook-search-get_mention
+         */
         bx_alert('search', 'get_mention', 0, 0, array('params' => $a[1], 'override_result' => &$aResult));
         
         header('Content-Type:text/javascript; charset=utf-8');

+ 62 - 0
inc/classes/BxDolTemplate.php

@@ -548,6 +548,17 @@ class BxDolTemplate extends BxDolFactory implements iBxDolSingleton
     {
         $aResult = self::$_aColors;
 
+        /**
+         * @hooks
+         * @hookdef hook-system-get_color_palette 'system', 'get_color_palette' - hook on get color palette
+         * - $unit_name - equals `system`
+         * - $action - equals `get_color_palette` 
+         * - $object_id - not used 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `override_result` - [array] by ref, array of colors, can be overridden in hook processing
+         * @hook @ref hook-system-get_color_palette
+         */
         bx_alert('system', 'get_color_palette', 0, false, array(
             'override_result' => &$aResult
         ));
@@ -692,6 +703,18 @@ class BxDolTemplate extends BxDolFactory implements iBxDolSingleton
         if(!self::$_aImages)
             self::$_aImages = [];
 
+        /**
+         * @hooks
+         * @hookdef hook-system-get_layout_images 'system', 'get_layout_images' - hook on get layout images
+         * - $unit_name - equals `system`
+         * - $action - equals `get_layout_images` 
+         * - $object_id - not used 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `code` - [string] page code
+         *      - `override_result` - [array] by ref, array of images, can be overridden in hook processing
+         * @hook @ref hook-system-get_layout_images
+         */
         bx_alert('system', 'get_layout_images', 0, false, [
             'code' => $this->_sCode,
             'override_result' => &self::$_aImages
@@ -2835,6 +2858,22 @@ class BxDolTemplate extends BxDolFactory implements iBxDolSingleton
             $sArrayKey = $sType . ($bSystem ? '_system' : '_compiled');
             switch($sAction) {
                 case 'add':
+                    /**
+                     * @hooks
+                     * @hookdef hook-system-add_files 'system', 'add_files' - hook on add file to page 
+                     * - $unit_name - equals `system`
+                     * - $action - equals `add_files` 
+                     * - $object_id - not used 
+                     * - $sender_id - not used 
+                     * - $extra_params - array of additional params with the following array keys:
+                     *      - `file` - [string] file name
+                     *      - `type` - [string] file type
+                     *      - `dynamic` - [bool] true if added as dynamic
+                     *      - `system` - [bool] true if system file
+                     *      - `url` - [string] by ref, file url, can be overridden in hook processing
+                     *      - `path` - [string] by ref, file path, can be overridden in hook processing
+                     * @hook @ref hook-system-add_files
+                     */
                     bx_alert('system', 'add_files', 0, 0, [
                         'file' => $sFile,
                         'type' => $sType,
@@ -3637,6 +3676,18 @@ class BxDolTemplate extends BxDolFactory implements iBxDolSingleton
         if (empty($oTemplate))
            $oTemplate = $this;
 
+        /**
+         * @hooks
+         * @hookdef hook-system-design_before_output 'system', 'design_before_output' - hook on before page's html generated
+         * - $unit_name - equals `system`
+         * - $action - equals `design_before_output` 
+         * - $object_id - not used 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `page` - [array] by ref, page object paramenters, can be overridden in hook processing
+         *      - `page_content` - [array] by ref, page content values, can be overridden in hook processing
+         * @hook @ref hook-system-design_before_output
+         */
         bx_alert('system', 'design_before_output', 0, 0, ['page' => &$this->aPage, 'page_content' => &$this->aPageContent]);
 
         header( 'Content-type: text/html; charset=utf-8' );
@@ -3646,6 +3697,17 @@ class BxDolTemplate extends BxDolFactory implements iBxDolSingleton
 
         $sResult = $oTemplate->parsePageByName('page_' . $oTemplate->getPageNameIndex() . '.html', $oTemplate->getPageContent());
         
+        /**
+         * @hooks
+         * @hookdef hook-system-design_after_output 'system', 'design_after_output' - hook on after page's html generated
+         * - $unit_name - equals `system`
+         * - $action - equals `design_after_output` 
+         * - $object_id - not used 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `override_result` - [string] by ref, html content for current page, can be overridden in hook processing
+         * @hook @ref hook-system-design_after_output
+         */
         bx_alert('system', 'design_after_output', 0, false, ['override_result' => &$sResult]);
         
         echo $sResult;

+ 27 - 0
inc/classes/BxDolTranscoder.php

@@ -490,6 +490,21 @@ class BxDolTranscoder extends BxDolFactory implements iBxDolFactoryObject
                 }
             }
 
+            /**
+             * @hooks
+             * @hookdef hook-system-transcode 'system', 'transcode' - hook on cancel vote 
+             * - $unit_name - equals `system`
+             * - $action - equals `transcode` 
+             * - $object_id - file handler
+             * - $sender_id - profile_id for vote's author
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `transcoder_object` - [array] transcoder object properties
+             *      - `object` - [object] transcoder object
+             *      - `db` - [object] database object
+             *      - `file_path` - [string] file path
+             *      - `ret` - [bool] return 
+             * @hook @ref hook-system-transcode
+             */
             bx_alert('system', 'transcode', $mixedHandler, false, array(
                 'transcoder_object' => $this->_aObject['object'],
                 'object' => $this,
@@ -523,6 +538,18 @@ class BxDolTranscoder extends BxDolFactory implements iBxDolFactoryObject
 
         } while (false);
 
+        /**
+         * @hooks
+         * @hookdef hook-system-transcoded 'system', 'transcoded' - hook on cancel vote 
+         * - $unit_name - equals `system`
+         * - $action - equals `transcoded` 
+         * - $object_id - file handler
+         * - $sender_id - profile_id for vote's author
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object` - [object] transcoder object
+         *      - `ret` - [bool] reported object id 
+         * @hook @ref hook-system-transcoded
+         */
         bx_alert($this->_aObject['object'], 'transcoded', $mixedHandler, false, array(
             'object' => $this,
             'ret' => $bRet,

+ 27 - 0
inc/classes/BxDolVote.php

@@ -255,7 +255,34 @@ class BxDolVote extends BxDolObject
 
         $this->_trigger();
 
+        /**
+         * @hooks
+         * @hookdef hook-vote-undo 'vote', 'undo' - hook on cancel vote 
+         * - $unit_name - equals `vote`
+         * - $action - equals `undo` 
+         * - $object_id - vote id 
+         * - $sender_id - profile_id for vote's author
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_system` - [string] system name, ex: bx_posts
+         *      - `object_id` - [int] reported object id 
+         *      - `object_author_id` - [int] author's profile_id for reported object_id 
+         * @hook @ref hook-vote-undo
+         */
         bx_alert($this->_sSystem, ($bPerformUndo ? 'un' : '') . 'doVote', $iObjectId, $iAuthorId, array_merge(['vote_id' => $iId, 'vote_author_id' => $iAuthorId, 'object_author_id' => $iObjectAuthorId], $aVoteData));
+        /**
+         * @hooks
+         * @hookdef hook-vote-do 'vote', 'do' - hook on new vote 
+         * - $unit_name - equals `vote`
+         * - $action - equals `do` 
+         * - $object_id - vote id 
+         * - $sender_id - profile_id for vote's author
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_system` - [string] system name, ex: bx_posts
+         *      - `object_id` - [int] reported object id 
+         *      - `object_author_id` - [int] author's profile_id for reported object_id 
+         * @hook @ref hook-vote-do
+         */
+        
         bx_alert('vote', ($bPerformUndo ? 'un' : '') . 'do', $iId, $iAuthorId, array_merge(['object_system' => $this->_sSystem, 'object_id' => $iObjectId, 'object_author_id' => $iObjectAuthorId], $aVoteData));
 
         $aResult = $this->_returnVoteData($iObjectId, $iAuthorId, $iAuthorIp, $aVoteData, !$bVoted, $aRequestParamsData);

+ 29 - 0
modules/boonex/albums/classes/BxAlbumsFormEntry.php

@@ -47,6 +47,21 @@ class BxAlbumsFormEntry extends BxBaseModTextFormEntry
             $aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);
             $iProfileId = $this->getContentOwnerProfileId($iContentId);
 
+             /**
+             * @hooks
+             * @hookdef hook-bx_albums-medias_added 'bx_albums', 'medias_added' - hook on new medias added in album
+             * - $unit_name - equals `bx_albums`
+             * - $action - equals `medias_added` 
+             * - $object_id - album_id
+             * - $sender_id - author's profile_id
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `object_author_id` - [int] confirmation type can be none/phone/email/email_and_phone/email_or_phone
+             *      - `subobjects_ids` - [array] array of ids for added media's
+             *      - `medias_added` - [array] array of ids for added media's
+             *      - `privacy_view` - [string] privacy view value for current album
+             *      - `cf` - [int] content filter id
+             * @hook @ref hook-bx_albums-medias_added
+             */
             bx_alert($this->_oModule->getName(), 'medias_added', $iContentId, $iProfileId, [
                 'object_author_id' => $iProfileId,
 
@@ -88,6 +103,20 @@ class BxAlbumsFormEntry extends BxBaseModTextFormEntry
 		        $oMetatags->keywordsAddOne($aMediaInfo['id'], $oMetatags->keywordsCameraModel($aExif));
 			}
         }
+        /**
+         * @hooks
+         * @hookdef hook-bx_albums-media_added 'bx_albums', 'media_added' - hook on new media added in album
+         * - $unit_name - equals `bx_albums`
+         * - $action - equals `media_added` 
+         * - $object_id - album_id
+         * - $sender_id - author's profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] confirmation type can be none/phone/email/email_and_phone/email_or_phone
+         *      - `subobject_id` - [int] id for added media
+         *      - `media_id` - [int] id for added media
+         *      - `media_info` - [array] media info
+         * @hook @ref hook-bx_albums-media_added
+         */
         bx_alert($this->_oModule->getName(), 'media_added', $iContentId, $iProfileId, array(
             'object_author_id' => $aContentInfo[$CNF['FIELD_AUTHOR']],
 

+ 15 - 0
modules/boonex/albums/classes/BxAlbumsModule.php

@@ -125,6 +125,21 @@ class BxAlbumsModule extends BxBaseModTextModule
         $aContentInfo = $this->_oDb->getContentInfoById($aMediaInfo['content_id']);
         $iSender = isLogged() ? bx_get_logged_profile_id() : $aMediaInfo['author'];
         $iAuthor = isset($aContentInfo[$CNF['FIELD_AUTHOR']]) ? $aContentInfo[$CNF['FIELD_AUTHOR']] : $aMediaInfo['author'];
+        
+        /**
+         * @hooks
+         * @hookdef hook-bx_albums-media_deleted 'bx_albums', 'media_deleted' - hook on new media deleted from album
+         * - $unit_name - equals `bx_albums`
+         * - $action - equals `media_deleted` 
+         * - $object_id - album_id
+         * - $sender_id - author's profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] confirmation type can be none/phone/email/email_and_phone/email_or_phone
+         *      - `subobject_id` - [int] id for added media
+         *      - `media_id` - [int] id for added media
+         *      - `media_info` - [array] media info
+         * @hook @ref hook-bx_albums-media_deleted
+         */
         bx_alert($this->getName(), 'media_deleted', $aMediaInfo['content_id'], $iSender, array(
             'object_author_id' => $iAuthor,
 

+ 40 - 1
modules/boonex/analytics/classes/BxAnalyticsModule.php

@@ -113,6 +113,17 @@ class BxAnalyticsModule extends BxDolModule
             }
         }
         
+        /**
+         * @hooks
+         * @hookdef hook-bx_analytics-get_modules 'bx_analytics', 'get_modules' - hook on get modules list with avalaible analytics
+         * - $unit_name - equals `get_modules`
+         * - $action - equals `get_modules` 
+         * - $object_id - not used
+         * - $sender_id -not used
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `list` - [array] by ref, array of modules for analytics as [module_name] = module_title, can be overridden in hook processing
+         * @hook @ref hook-bx_analytics-get_modules
+         */
         bx_alert($this->_aModule['name'], 'get_modules', 0, 0, array(
             'list' => &$aResult,
         ));
@@ -158,7 +169,18 @@ class BxAnalyticsModule extends BxDolModule
             $aRv[BX_ANALYTICS_CONTENT_TOTAL] = _t('_bx_analytics_type_content_growth');
             $aRv[BX_ANALYTICS_CONTENT_SPEED] = _t('_bx_analytics_type_content_speed');
         }
-        
+        /**
+         * @hooks
+         * @hookdef hook-bx_analytics-get_reports 'bx_analytics', 'get_reports' - hook on get avalaible reports for specified module
+         * - $unit_name - equals `bx_analytics`
+         * - $action - equals `get_reports` 
+         * - $object_id - not used
+         * - $sender_id -not used
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `module` - [string] module name
+         *      - `list` - [array] by ref, array of avalaible reports for analytics as [report_name] = report_title, can be overridden in hook processing
+         * @hook @ref hook-bx_analytics-get_reports
+         */
         bx_alert($this->_aModule['name'], 'get_reports', 0, 0, array(
             'module' => $sModuleName,
             'list' => &$aRv,
@@ -316,6 +338,23 @@ class BxAnalyticsModule extends BxDolModule
                 $aData = array();
                 $iValuePrev = 0;
                 
+                /**
+                 * @hooks
+                 * @hookdef hook-bx_analytics-get_chart_data_line 'bx_analytics', 'get_chart_data_line' - hook on get avalaible reports for specified module
+                 * - $unit_name - equals `bx_analytics`
+                 * - $action - equals `get_chart_data_line` 
+                 * - $object_id - not used
+                 * - $sender_id -not used
+                 * - $extra_params - array of additional params with the following array keys:
+                 *      - `module` - [string] module name
+                 *      - `report_name` - [string] report name
+                 *      - `report_type` - [string]  by ref, report name, can be overridden in hook processing
+                 *      - `date_from` - [int] report's start of interval in php time format
+                 *      - `date_to` - [int] report's end of interval in php time format
+                 *      - `data` - [array] by ref, array of data for chart, can be overridden in hook processing
+                 *      - `prev_value` - [int] by ref, previous value for chart (started value), can be overridden in hook processing
+                 * @hook @ref hook-bx_analytics-get_chart_data_line
+                 */
                 bx_alert($this->_aModule['name'], 'get_chart_data_line', 0, 0, array(
                     'module' => $sModuleName,
                     'report_name' => $sReportName,

+ 53 - 0
modules/boonex/channels/classes/BxCnlModule.php

@@ -91,6 +91,23 @@ class BxCnlModule extends BxBaseModGroupsModule
 
         $iCnlProfileId = $oCnlProfile->id();
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_channels-hashtag_added 'bx_channels', 'hashtag_added' - hook on found hashtag in content
+         * - $unit_name - equals `bx_channels`
+         * - $action - equals `hashtag_added` 
+         * - $object_id - content_id in channel
+         * - $sender_id - channel profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] profile_id for content's author
+         *      - `privacy_view` - [string] equal - channel_profile_id
+         *      - `subobject_id` - [int]  content_id in channel
+         *      - `content_module` - [string] module name for content
+         *      - `content_id` - [int] content_id
+         *      - `content_author_id` - [int] equal with object_author_id
+         *      - `timeline_group` - [array] parameters for group event in timeline  ['by' => $sModuleName . '_' . $iAuthorId . '_' . $iContentId, 'field' => 'owner_id']
+         * @hook @ref hook-bx_channels-hashtag_added
+         */
         bx_alert($this->_aModule['name'], 'hashtag_added', $iId, $iCnlProfileId, array(
             'object_author_id' => $iAuthorId, 
             'privacy_view' => -$iCnlProfileId,
@@ -113,6 +130,22 @@ class BxCnlModule extends BxBaseModGroupsModule
             'content_author_id' => $iAuthorId
         );
         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));
+        /**
+         * @hooks
+         * @hookdef hook-bx_channels-hashtag_added_notif 'bx_channels', 'hashtag_added_notif' - hook on after found hashtag in content
+         * - $unit_name - equals `bx_channels`
+         * - $action - equals `hashtag_added_notif` 
+         * - $object_id - channel id
+         * - $sender_id - channel profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] profile_id for content's author
+         *      - `privacy_view` - [string] equal - channel_profile_id
+         *      - `subobject_id` - [int]  content_id in channel
+         *      - `content_module` - [string] module name for content
+         *      - `content_id` - [int] content_id
+         *      - `content_author_id` - [int] equal with object_author_id
+         * @hook @ref hook-bx_channels-hashtag_added_notif
+         */
         bx_alert($this->_aModule['name'], 'hashtag_added_notif', $mixedCnlId, $iCnlProfileId, $aParams);
     }
     
@@ -124,7 +157,27 @@ class BxCnlModule extends BxBaseModGroupsModule
         foreach ($aData as $aRow) {
             $iProfileInfo = $oDolProfileQuery->getProfileByContentAndType($aRow['cnl_id'], $this->_aModule['name']);
             if(is_array($iProfileInfo)){
+                /**
+                 * @hooks
+                 * @hookdef hook-bx_channels-hashtag_deleted 'bx_channels', 'hashtag_deleted' - hook on before delete content from channel
+                 * - $unit_name - equals `bx_channels`
+                 * - $action - equals `hashtag_deleted` 
+                 * - $object_id - content id in channel
+                 * - $sender_id - channel profile_id
+                 * @hook @ref hook-bx_channels-hashtag_deleted
+                 */
                 bx_alert($this->_aModule['name'], 'hashtag_deleted', $aRow['id'], $iProfileInfo['id']);
+                 /**
+                 * @hooks
+                 * @hookdef hook-bx_channels-hashtag_deleted_notif 'bx_channels', 'hashtag_deleted_notif' - hook on before delete content from channel
+                 * - $unit_name - equals `bx_channels`
+                 * - $action - equals `hashtag_deleted_notif` 
+                 * - $object_id - channel id
+                 * - $sender_id - channel profile_id
+                 * - $extra_params - array of additional params with the following array keys:
+                 *      - `subobject_id` - [int] content id in channel
+                 * @hook @ref hook-bx_channels-hashtag_deleted_notif
+                 */
                 bx_alert($this->_aModule['name'], 'hashtag_deleted_notif', $aRow['cnl_id'], $iProfileInfo['id'], array('subobject_id' => $aRow['id']));
             }
         }

+ 27 - 0
modules/boonex/convos/classes/BxCnvFormEntry.php

@@ -54,6 +54,19 @@ class BxCnvFormEntry extends BxBaseModTextFormEntry
         // check for spam
         $bSpam = false;
         $sValue = $this->getCleanValue($CNF['FIELD_TEXT']);
+         /**
+         * @hooks
+         * @hookdef hook-system-check_spam 'system', 'check_spam' - hook on check spam in some content
+         * - $unit_name - equals `system`
+         * - $action - equals `check_spam` 
+         * - $object_id - not used  
+         * - $sender_id - account id for current user
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `is_spam` - [bool] by ref, сontain spam content or not, can be overridden in hook processing
+         *      - `content` - [string] by ref, content, can be overridden in hook processing
+         *      - `where` - [string] module name
+         * @hook @ref hook-system-check_spam
+         */
         bx_alert('system', 'check_spam', 0, getLoggedId(), array('is_spam' => &$bSpam, 'content' => &$sValue, 'where' => $this->MODULE));
         self::setSubmittedValue($CNF['FIELD_TEXT'], $sValue, $this->aFormAttrs['method']);
 
@@ -114,6 +127,20 @@ class BxCnvFormEntry extends BxBaseModTextFormEntry
             else {
                 if($iRecipient != $iSender) {
                     $bCanContact = true;
+                    /**
+                     * @hooks
+                     * @hookdef hook-profile-check_contact 'profile', 'check_contact' - hook on check some profile to allow contact him
+                     * - $unit_name - equals `profile`
+                     * - $action - equals `check_contact` 
+                     * - $object_id - not used  
+                     * - $sender_id - not used
+                     * - $extra_params - array of additional params with the following array keys:
+                     *      - `can_contact` - [bool] by ref, can contact or not, can be overridden in hook processing
+                     *      - `sender` - [int] profile_id for sender
+                     *      - `recipient` - [int] profile_id for recipient 
+                     *      - `where` - [string] module name
+                     * @hook @ref hook-profile-check_contact
+                     */
                     bx_alert('profile', 'check_contact', 0, false, array('can_contact' => &$bCanContact, 'sender' => $iSender, 'recipient' => $iRecipient, 'where' => $this->MODULE));
                     if(!$bCanContact)
                         $iFolder = BX_CNV_FOLDER_SPAM;

+ 8 - 1
modules/boonex/convos/classes/BxCnvFormsEntryHelper.php

@@ -29,7 +29,14 @@ class BxCnvFormsEntryHelper extends BxBaseModTextFormsEntryHelper
         if ($sResult = $this->onDataDeleteAfter ($aContentInfo[$CNF['FIELD_ID']], $aContentInfo, $oProfile))
             return $sResult;
 
-        // create an alert
+        /**
+         * @hooks
+         * @hookdef hook-bx_convos-deleted 'bx_convos', 'deleted' - hook on delete conversation
+         * - $unit_name - equals `bx_convos`
+         * - $action - equals `deleted` 
+         * - $object_id - conversation id
+         * @hook @ref hook-bx_convos-deleted
+         */
         bx_alert($this->_oModule->getName(), 'deleted', $aContentInfo[$CNF['FIELD_ID']]);
 
         return '';

+ 40 - 0
modules/boonex/events/classes/BxEventsModule.php

@@ -136,6 +136,17 @@ class BxEventsModule extends BxBaseModGroupsModule implements iBxDolCalendarServ
         if(!$this->_oDb->checkIn($iProfileId, $iId))
             return false;
 
+         /**
+         * @hooks
+         * @hookdef hook-bx_events-check_in 'bx_events', 'check_in' - hook in on somebody check-in some event 
+         * - $unit_name - equals `bx_events`
+         * - $action - equals `check_in` 
+         * - $object_id - event_id
+         * - $sender_id - current user's profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `event_profile_id` - [int] profile_id from checked event
+         * @hook @ref hook-bx_events-check_in
+         */
         bx_alert($this->getName(), 'check_in', $iId, $iProfileId, [
             'event_profile_id' => $aDataEntry['profile_id'],
         ]);
@@ -247,6 +258,23 @@ class BxEventsModule extends BxBaseModGroupsModule implements iBxDolCalendarServ
             $aEntry['cover'] = $this->serviceGetCover($aEntry['id']);
         }
         
+        /**
+         * @hooks
+         * @hookdef hook-bx_events-calendar_data 'bx_events', 'calendar_data' - hook in get data for calendar
+         * - $unit_name - equals `bx_events`
+         * - $action - equals `calendar_data` 
+         * - $object_id - not used 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `params` - [array] array of paramaretes in calendar 
+         *      - `event` - [int] event id
+         *      - `context_id` - [int] profile_id for context of current event
+         *      - `start` - [string] start date in format date('d.m.Y')
+         *      - `end` - [string] end date in format date('d.m.Y')
+         *      - `sql_part` - [array] by ref, sql for data selection, can be overridden in hook processing
+         *      - `data` - [array] by ref, data for calendar, can be overridden in hook processing
+         * @hook @ref hook-bx_events-calendar_data
+         */
         bx_alert($this->getName(), 'calendar_data', 0, false, array(
             'params' => $aParams,
             'event' => $iContentId,
@@ -640,6 +668,18 @@ class BxEventsModule extends BxBaseModGroupsModule implements iBxDolCalendarServ
                 if($bUseIn)
                     $this->sendReminders($aEntry);
 
+                /**
+                 * @hooks
+                 * @hookdef hook-bx_events-reminder 'bx_events', 'reminder' - hook on enent's reminder
+                 * - $unit_name - equals `bx_events`
+                 * - $action - equals `reminder` 
+                 * - $object_id - event_id
+                 * - $sender_id - event profile_id
+                 * - $extra_params - array of additional params with the following array keys:
+                 *      - `object_author_id` - [int] event profile_id 
+                 *      - `reminder` - [int] reminder id
+                 * @hook @ref hook-bx_events-reminder
+                 */
                 bx_alert($sModule, 'reminder', $aEntry[$CNF['FIELD_ID']], $iEventProfileId, array(
                     'object_author_id' => $iEventProfileId,
                     'reminder' => $iReminder

+ 88 - 0
modules/boonex/feedback/classes/BxFdbModule.php

@@ -304,11 +304,29 @@ class BxFdbModule extends BxBaseModGeneralModule
      */
     public function onAddQuestion($iId)
     {
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-added_question 'bx_feedback', 'added_question' - hook on new question added
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `added_question` 
+         * - $object_id - question_id
+         * - $sender_id - not used
+         * @hook @ref hook-bx_feedback-added_question
+         */
         bx_alert($this->getName(), 'added_question', $iId);
     }
 
     public function onEditQuestion($iId)
     {
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-edited_question 'bx_feedback', 'edited_question' - hook on new question edited
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `edited_question` 
+         * - $object_id - question_id
+         * - $sender_id - not used
+         * @hook @ref hook-bx_feedback-edited_question
+         */
         bx_alert($this->getName(), 'edited_question', $iId);
     }
 
@@ -328,6 +346,18 @@ class BxFdbModule extends BxBaseModGeneralModule
                 $this->_oDb->deleteAnswer2User(array('answer_id' => $aAnswer[$CNF['FIELD_ANS_ID']]));
             }
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-deleted_question 'bx_feedback', 'deleted_question' - hook on question deleted
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `deleted_question` 
+         * - $object_id - question_id
+         * - $sender_id - not used
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `question` - [array] all question info
+         *      - `answers` - [array] answers for current question
+         * @hook @ref hook-bx_feedback-deleted_question
+         */
         bx_alert($this->getName(), 'deleted_question', $aQuestion[$CNF['FIELD_ID']], false, array(
             'question' => $aQuestion,
             'answers' => $aAnswers,
@@ -341,6 +371,21 @@ class BxFdbModule extends BxBaseModGeneralModule
         $sModule = $this->getName();
         $aAnswer = $this->_oDb->getAnswers(array('type' => 'id', 'id' => $iAnswerId));
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-added_answer 'bx_feedback', 'added_answer' - hook on new answer added
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `added_answer` 
+         * - $object_id - answer id
+         * - $sender_id - current user profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] current user profile_id
+         *      - `question_id` - [int] question id
+         *      - `important` - [string] answer's important value
+         *      - `data` - [string] answer's content
+         *      - `votes` - [int] count of votes
+         * @hook @ref hook-bx_feedback-added_answer
+         */
         bx_alert($sModule, 'added_answer', $iAnswerId, $iProfileId, array_merge(array(
             'object_author_id' => $iProfileId,
             'question_id' => $iQuestionId, 
@@ -349,6 +394,21 @@ class BxFdbModule extends BxBaseModGeneralModule
             'votes' => $aAnswer['votes']
         ), $aParams));
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-added_answer_notif 'bx_feedback', 'added_answer_notif' - hook on new answer added
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `added_answer_notif` 
+         * - $object_id - question_id
+         * - $sender_id - current user profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] current user profile_id
+         *      - `subobject_id` - [int] answer id
+         *      - `important` - [string] answer's important value
+         *      - `data` - [string] answer's content
+         *      - `votes` - [int] count of votes
+         * @hook @ref hook-bx_feedback-added_answer_notif
+         */
         bx_alert($sModule, 'added_answer_notif', $iQuestionId, $iProfileId, array_merge(array(
             'object_author_id' => $iProfileId,
             'subobject_id' => $iAnswerId, 
@@ -365,6 +425,20 @@ class BxFdbModule extends BxBaseModGeneralModule
         $sModule = $this->getName();
         $aAnswer = $this->_oDb->getAnswers(array('type' => 'id', 'id' => $iAnswerId));
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-deleted_answer 'bx_feedback', 'deleted_answer' - hook on new answer deleted
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `deleted_answer` 
+         * - $object_id - answer id
+         * - $sender_id - current user profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `question_id` - [int] question id
+         *      - `important` - [string] answer's important value
+         *      - `data` - [string] answer's content
+         *      - `votes` - [int] count of votes
+         * @hook @ref hook-bx_feedback-deleted_answer
+         */
         bx_alert($sModule, 'deleted_answer', $iAnswerId, $iProfileId, array_merge(array(
             'question_id' => $iQuestionId,
             'important' => $aAnswer['important'],
@@ -372,6 +446,20 @@ class BxFdbModule extends BxBaseModGeneralModule
             'votes' => $aAnswer['votes']
         ), $aParams));
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-deleted_answer_notif 'bx_feedback', 'added_answer_notif' - hook on new answer deleted
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `added_answer_notif` 
+         * - $object_id - question_id
+         * - $sender_id - current user profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `subobject_id` - [int] answer id
+         *      - `important` - [string] answer's important value
+         *      - `data` - [string] answer's content
+         *      - `votes` - [int] count of votes
+         * @hook @ref hook-bx_feedback-added_answer_notif
+         */
         bx_alert($sModule, 'deleted_answer_notif', $iQuestionId, $iProfileId, array_merge(array(
             'subobject_id' => $iAnswerId,
             'important' => $aAnswer['important'],

+ 29 - 3
modules/boonex/invites/classes/BxInvModule.php

@@ -550,10 +550,29 @@ class BxInvModule extends BxDolModule
 
     public function onRequest($iRequestId)
     {
-        //--- Event -> Request for Alerts Engine ---//
+        /**
+         * @hooks
+         * @hookdef hook-bx_invites-deleted_answer_notif 'bx_invites', 'request' - hook on create new request on invite
+         * - $unit_name - equals `bx_invites`
+         * - $action - equals `request` 
+         * - $object_id - request id
+         * - $sender_id - not used
+         * @hook @ref hook-bx_invites-request
+         */
         bx_alert($this->_oConfig->getObject('alert'), 'request', $iRequestId);
         $aProfiles = BxDolAclQuery::getInstance()->getProfilesByMembership(array(MEMBERSHIP_ID_MODERATOR, MEMBERSHIP_ID_ADMINISTRATOR));
         foreach($aProfiles as $aProfile) {
+            /**
+             * @hooks
+             * @hookdef hook-bx_invites-request_notify 'bx_invites', 'request_notify' - hook on notify all admins&moderators about new request
+             * - $unit_name - equals `bx_invites`
+             * - $action - equals `request_notify` 
+             * - $object_id - request id
+             * - $sender_id - not used
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `parent_author_id` - [int] profile_id of notified profile
+             * @hook @ref hook-bx_invites-request_notify
+             */
             bx_alert($this->_oConfig->getObject('alert'), 'request_notify', $iRequestId, 0, array('parent_author_id' => $aProfile['id']));
         }
         //--- Event -> Request for Alerts Engine ---//
@@ -594,9 +613,16 @@ class BxInvModule extends BxDolModule
     {
         $this->isAllowedInvite($iProfileId, true);
 
-        //--- Event -> Invite for Alerts Engine ---//
+        /**
+         * @hooks
+         * @hookdef hook-bx_invites-invite 'bx_invites', 'invite' - hook on new invite
+         * - $unit_name - equals `bx_invites`
+         * - $action - equals `invite` 
+         * - $object_id - not used
+         * - $sender_id - invited profile_id
+         * @hook @ref hook-bx_invites-invite
+         */
         bx_alert($this->_oConfig->getObject('alert'), 'invite', 0, $iProfileId);
-        //--- Event -> Invite for Alerts Engine ---//
     }
     
     public function getJoinLink($sKey)

+ 13 - 0
modules/boonex/invites/classes/BxInvResponse.php

@@ -87,6 +87,19 @@ class BxInvResponse extends BxDolAlertsResponse
             return;
         
 		$bNeedToFriend = true;
+        
+        /**
+         * @hooks
+         * @hookdef hook-bx_invites-add_friend 'bx_invites', 'add_friend' - hook on add friend on new user registred by invitaion
+         * - $unit_name - equals `add_friend`
+         * - $action - equals `invite` 
+         * - $object_id - not used
+         * - $sender_id - not used
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `profile_id` - [int] profile_id for user registred by invitaion
+         *      - `override_result` - [bool] by ref, if true friend will be added, can be overridden in hook processing
+         * @hook @ref hook-bx_invites-add_friend
+         */
 		bx_alert($this->_sModule, 'add_friend', 0, 0, [
 			'profile_id' => $oAlert->iObject,
 			'override_result' => &$bNeedToFriend,

+ 10 - 0
modules/boonex/market/classes/BxMarketCronPruning.php

@@ -48,6 +48,16 @@ class BxMarketCronPruning extends BxDolCron
                 }
             }
 
+             /**
+             * @hooks
+             * @hookdef hook-bx_market-license_expire 'bx_market', 'license_expire' - hook on found expired license
+             * - $unit_name - equals `bx_market`
+             * - $action - equals `license_expire` 
+             * - $object_id - not used 
+             * - $sender_id - not used 
+             * - $extra_params - array of expired licenses
+             * @hook @ref hook-bx_market-license_expire
+             */
             bx_alert($this->_oModule->getName(), 'license_expire', 0, false, $aLicense);
             
             $this->_oModule->_oDb->processExpiredLicense($aLicense);

+ 10 - 0
modules/boonex/market/classes/BxMarketGridLicensesAdministration.php

@@ -92,6 +92,16 @@ class BxMarketGridLicensesAdministration extends BxTemplGrid
                 continue;
 
             if((int)$mixedResult > 0)
+                /**
+                 * @hooks
+                 * @hookdef hook-bx_market-license_reset 'bx_market', 'license_reset' - hook on license reset
+                 * - $unit_name - equals `bx_market`
+                 * - $action - equals `license_reset` 
+                 * - $object_id - not used 
+                 * - $sender_id - not used 
+                 * - $extra_params - array of reseted licenses
+                 * @hook @ref hook-bx_market-license_reset
+                 */
                 bx_alert($this->_oModule->getName(), 'license_reset', 0, false, $this->_oModule->_oDb->getLicense([
                     'type' => 'id',
                     'id' => $iId

+ 20 - 0
modules/boonex/smtpmailer/classes/BxSMTPModule.php

@@ -138,6 +138,26 @@ class BxSMTPModule extends BxDolModule
             'ret'       => $iRet,
             'error_message' => $sErrorMessage,            
         );
+        /**
+         * @hooks
+         * @hookdef hook-profile-send_mail 'profile', 'send_mail' - hook in  $oAccount->isConfirmed check
+         * - $unit_name - equals `profile`
+         * - $action - equals `send_mail` 
+         * - $object_id - not used 
+         * - $sender_id - recipient profile_id 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `test_mode` - [bool] test mode or not
+         *      - `email` - [string] email
+         *      - `subject` - [string] letter subject
+         *      - `body` - [string] letter body
+         *      - `header` - [string] letter header
+         *      - `params` - [string] letter params
+         *      - `recipient` - [array] recipient info
+         *      - `html` - [bool] is html letter or not
+         *      - `ret` - [bool] sent successfuly  or not
+         *      - `error_message` - [string] error message
+         * @hook @ref hook-profile-send_mail
+         */
         bx_alert('profile', 'send_mail', $aRecipientInfo && isset($aRecipientInfo['ID']) ? $aRecipientInfo['ID'] : 0, '', $aAlertData);
         //--- create system event [ end ]
 

+ 12 - 0
modules/boonex/stream/classes/BxStrmModule.php

@@ -281,6 +281,18 @@ class BxStrmModule extends BxBaseModTextModule
 
         $this->onPublished($iContentId);
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_stream-publish_succeeded 'bx_stream', 'publish_succeeded' - hook on stream published succeeded
+         * - $unit_name - equals `bx_stream`
+         * - $action - equals `publish_succeeded` 
+         * - $object_id - stream id
+         * - $sender_id - profile_id of stream's author
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] stream's author
+         *      - `privacy_view` - [int] BX_DOL_PG_ALL
+         * @hook @ref hook-bx_stream-publish_succeeded
+         */
         bx_alert($this->getName(), 'publish_succeeded', $aContentInfo[$CNF['FIELD_ID']], $aContentInfo[$CNF['FIELD_AUTHOR']], array(
             'object_author_id' => $aContentInfo[$CNF['FIELD_AUTHOR']],
             'privacy_view' => BX_DOL_PG_ALL,

+ 24 - 0
modules/boonex/tasks/classes/BxTasksFormEntry.php

@@ -226,6 +226,18 @@ class BxTasksFormEntry extends BxBaseModTextFormEntry
         foreach($aMembersToAdd as $iProfileId){
             $oConn->addConnection($iProfileId, $iContentId);
 
+             /**
+             * @hooks
+             * @hookdef hook-bx_tasks-assigned 'bx_tasks', 'assigned' - hook on task assigned to profile
+             * - $unit_name - equals `bx_tasks`
+             * - $action - equals `assigned` 
+             * - $object_id - task id 
+             * - $sender_id - not used 
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `object_author_id` - [int] id for assigned profile
+             *      - `privacy_view` - [string] privacy view value
+             * @hook @ref hook-bx_tasks-assigned
+             */
             bx_alert($this->MODULE, 'assigned', $iContentId, false, array(
                 'object_author_id' => $iProfileId,
                 'privacy_view' => $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]
@@ -235,6 +247,18 @@ class BxTasksFormEntry extends BxBaseModTextFormEntry
         foreach($aMembersToRemove as $iProfileId){
             $oConn->removeConnection($iProfileId, $iContentId);
 
+            /**
+             * @hooks
+             * @hookdef hook-bx_tasks-unassigned 'bx_tasks', 'unassigned' - hook on task unassigned to profile
+             * - $unit_name - equals `bx_tasks`
+             * - $action - equals `unassigned` 
+             * - $object_id - task id 
+             * - $sender_id - not used 
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `object_author_id` - [int] id for unassigned profile
+             *      - `privacy_view` - [string] privacy view value
+             * @hook @ref hook-bx_tasks-unassigned
+             */
             bx_alert($this->MODULE, 'unassigned', $iContentId, false, array(
                 'object_author_id' => $iProfileId,
                 'privacy_view' => $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]

+ 26 - 1
modules/boonex/tasks/classes/BxTasksModule.php

@@ -57,6 +57,18 @@ class BxTasksModule extends BxBaseModTextModule implements iBxDolCalendarService
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
 
         $iContentAuthor = (int)$aContentInfo[$CNF['FIELD_AUTHOR']];
+        /**
+         * @hooks
+         * @hookdef hook-bx_tasks-completed 'bx_tasks', 'completed' - hook on task unassigned to profile
+         * - $unit_name - equals `bx_tasks`
+         * - $action - can be `completed` or `reopened`
+         * - $object_id - task id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] profile_id for task's author
+         *      - `privacy_view` - [string] privacy view value
+         * @hook @ref hook-bx_tasks-completed
+         */
         bx_alert($this->getName(), $sActionName, $iContentId, false, array(
             'object_author_id' => $iContentAuthor,
             'privacy_view' => $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]
@@ -669,11 +681,24 @@ class BxTasksModule extends BxBaseModTextModule implements iBxDolCalendarService
         if($oConnection) {
             $aProfileIds = $oConnection->getConnectedContent($iContentId);
             if(!empty($aProfileIds) && is_array($aProfileIds))
-                foreach($aProfileIds as $iProfileId)
+                foreach($aProfileIds as $iProfileId){
+                    /**
+                     * @hooks
+                     * @hookdef hook-bx_tasks-expired 'bx_tasks', 'expired' - hook on task unassigned to profile
+                     * - $unit_name - equals `bx_tasks`
+                     * - $action - equals `expired`
+                     * - $object_id - task id 
+                     * - $sender_id - not used 
+                     * - $extra_params - array of additional params with the following array keys:
+                     *      - `object_author_id` - [int] profile_id for task's author
+                     *      - `privacy_view` - [string] privacy view value
+                     * @hook @ref hook-bx_tasks-expired
+                     */
                     bx_alert($this->getName(), 'expired', $iContentId, false, array(
                         'object_author_id' => $iProfileId,
                         'privacy_view' => $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]
                     ));
+                }
         }
     }