Quellcode durchsuchen

Ticket #1470 - Comments.

AntonLV vor 8 Jahren
Ursprung
Commit
0e479c8bb2

+ 25 - 12
inc/classes/BxDolCmts.php

@@ -791,14 +791,14 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
         if(isAdmin())
             return true;
 
-        if($this->checkAction('comments edit all', $isPerformAction))
+        if($this->isEditAllowedAll($isPerformAction))
             return true;
-            
+
         $mixedResult = BxDolService::call($this->_aSystem['module'], 'check_allowed_comments_post', array($this->getId(), $this->getSystemName()));
         if($mixedResult !== CHECK_ACTION_RESULT_ALLOWED)
             return false;
 
-        return $aCmt['cmt_author_id'] == $this->_getAuthorId() && $this->checkAction ('comments edit own', $isPerformAction);
+        return abs($aCmt['cmt_author_id']) == $this->_getAuthorId() && $this->checkAction ('comments edit own', $isPerformAction);
     }
 
     public function msgErrEditAllowed ()
@@ -806,14 +806,24 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
         return $this->checkActionErrorMsg ('comments edit own');
     }
 
+    public function isEditAllowedAll ($isPerformAction = false)
+    {
+        return $this->checkAction('comments edit all', $isPerformAction);
+    }
+
     public function isRemoveAllowed ($aCmt, $isPerformAction = false)
     {
         if(isAdmin())
             return true;
 
-        if($aCmt['cmt_author_id'] == $this->_getAuthorId() && $this->checkAction ('comments remove own', $isPerformAction))
+        if($this->isRemoveAllowedAll($isPerformAction))
             return true;
 
+        return abs($aCmt['cmt_author_id']) == $this->_getAuthorId() && $this->checkAction ('comments remove own', $isPerformAction);
+    }
+
+    public function isRemoveAllowedAll ($isPerformAction = false)
+    {
         return $this->checkAction ('comments remove all', $isPerformAction);
     }
 
@@ -829,6 +839,11 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
     	return $oMenuManage->isVisible();
     }
 
+    public function isModerator()
+    {
+        return $this->isEditAllowedAll() || $this->isRemoveAllowedAll();
+    }
+
     /**
      * Actions functions
      */
@@ -1291,6 +1306,11 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
 
     protected function _getAuthorInfo($iAuthorId = 0)
     {
+        $iUserId = $this->_getAuthorId();
+        $iAuthorId = (int)$iAuthorId;
+        if($iAuthorId < 0  && (abs($iAuthorId) == $iUserId || $this->isModerator()))
+            $iAuthorId *= -1;
+
         $oProfile = $this->_getAuthorObject($iAuthorId);
 
         return array(
@@ -1303,14 +1323,7 @@ class BxDolCmts extends BxDolFactory implements iBxDolReplaceable, iBxDolContent
 
     protected function _getAuthorObject($iAuthorId = 0)
     {
-        if(empty($iAuthorId))
-            return BxDolProfileUndefined::getInstance();
-
-        $oProfile = BxDolProfile::getInstance($iAuthorId);
-        if (!$oProfile)
-            $oProfile = BxDolProfileUndefined::getInstance();
-
-        return $oProfile;
+        return BxDolProfile::getInstanceMagic($iAuthorId);
     }
 
 	protected function _getFormObject($sAction = BX_CMT_ACTION_POST)

+ 1 - 1
inc/js/classes/BxDolCmts.js

@@ -438,7 +438,7 @@ BxDolCmts.prototype.showLiveUpdate = function(oData)
         onShow: function() {
             setTimeout(function() {
                 $('.bx-popup-chain.bx-popup-applied:visible:first').dolPopupHide();
-            }, 5000);
+            }, 50000);
         },
     	onHide: function() {
             $this.resumeLiveUpdates();

+ 1 - 0
install/sql/system.sql

@@ -2948,6 +2948,7 @@ INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `c
 ('sys_comment', 'system', 'cmt_id', '', '', 0, 'hidden', '_sys_form_comment_input_caption_system_cmt_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
 ('sys_comment', 'system', 'cmt_parent_id', '', '', 0, 'hidden', '_sys_form_comment_input_caption_system_cmt_parent_id', '', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
 ('sys_comment', 'system', 'cmt_text', '', '', 0, 'textarea', '_sys_form_comment_input_caption_system_cmt_text', '', '', 0, 0, 3, 'a:1:{s:12:"autocomplete";s:3:"off";}', '', '', 'Length', 'a:2:{s:3:"min";i:1;s:3:"max";i:5000;}', '_Please enter n1-n2 characters', 'XssHtml', '', 1, 0),
+('sys_comment', 'system', 'cmt_anonymous', '', '', 0, 'switcher', '_sys_form_input_sys_anonymous', '_sys_form_input_anonymous', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('sys_comment', 'system', 'cmt_image', 'a:1:{i:0;s:15:"sys_cmts_simple";}', 'a:1:{s:15:"sys_cmts_simple";s:26:"_sys_uploader_simple_title";}', 0, 'files', '_sys_form_comment_input_caption_system_cmt_image', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 1, 0),
 ('sys_comment', 'system', 'cmt_submit', '_sys_form_comment_input_submit', '', 0, 'submit', '_sys_form_comment_input_caption_system_cmt_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
 

+ 1 - 1
modules/boonex/albums/install/sql/install.sql

@@ -90,7 +90,7 @@ CREATE TABLE IF NOT EXISTS `bx_albums_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/channels/install/sql/install.sql

@@ -74,7 +74,7 @@ CREATE TABLE IF NOT EXISTS `bx_cnl_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/convos/install/sql/install.sql

@@ -85,7 +85,7 @@ CREATE TABLE IF NOT EXISTS `bx_convos_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 2 - 2
modules/boonex/english/data/langs/system/en.xml

@@ -1963,8 +1963,8 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_form_display_account_settings_email"><![CDATA[Email Settings]]></string>
 	<string name="_sys_form_display_account_settings_info"><![CDATA[Edit Account]]></string>
 	<string name="_sys_form_display_account_settings_password"><![CDATA[Change Password]]></string>
-	<string name="_sys_form_display_comment_edit"><![CDATA[Comment From Edit]]></string>
-	<string name="_sys_form_display_comment_post"><![CDATA[Comment From Post]]></string>
+	<string name="_sys_form_display_comment_edit"><![CDATA[Comment Edit Form]]></string>
+	<string name="_sys_form_display_comment_post"><![CDATA[Comment Post Form]]></string>
 	<string name="_sys_form_display_confirm_email"><![CDATA[Email Confirmation]]></string>
 	<string name="_sys_form_display_confirm_phone_set_phone"><![CDATA[Set phone]]></string>
 	<string name="_sys_form_display_confirm_phone_confirmation"><![CDATA[Phone confirmation]]></string>

+ 1 - 1
modules/boonex/events/install/sql/install.sql

@@ -85,7 +85,7 @@ CREATE TABLE IF NOT EXISTS `bx_events_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/files/install/sql/install.sql

@@ -69,7 +69,7 @@ CREATE TABLE IF NOT EXISTS `bx_files_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/forum/install/sql/install.sql

@@ -91,7 +91,7 @@ CREATE TABLE IF NOT EXISTS `bx_forum_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/glossary/install/sql/install.sql

@@ -67,7 +67,7 @@ CREATE TABLE IF NOT EXISTS `bx_glossary_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/groups/install/sql/install.sql

@@ -66,7 +66,7 @@ CREATE TABLE IF NOT EXISTS `bx_groups_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/market/install/sql/install.sql

@@ -178,7 +178,7 @@ CREATE TABLE IF NOT EXISTS `bx_market_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/organizations/install/sql/install.sql

@@ -65,7 +65,7 @@ CREATE TABLE IF NOT EXISTS `bx_organizations_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/persons/install/sql/install.sql

@@ -65,7 +65,7 @@ CREATE TABLE IF NOT EXISTS `bx_persons_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/photos/install/sql/install.sql

@@ -69,7 +69,7 @@ CREATE TABLE IF NOT EXISTS `bx_photos_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/polls/install/sql/install.sql

@@ -79,7 +79,7 @@ CREATE TABLE IF NOT EXISTS `bx_polls_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/posts/install/sql/install.sql

@@ -81,7 +81,7 @@ CREATE TABLE IF NOT EXISTS `bx_posts_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/shopify/install/sql/install.sql

@@ -44,7 +44,7 @@ CREATE TABLE IF NOT EXISTS `bx_shopify_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/snipcart/install/sql/install.sql

@@ -81,7 +81,7 @@ CREATE TABLE IF NOT EXISTS `bx_snipcart_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/timeline/install/sql/install.sql

@@ -167,7 +167,7 @@ CREATE TABLE IF NOT EXISTS `bx_timeline_comments` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_time` int(11) unsigned NOT NULL DEFAULT '0',

+ 1 - 1
modules/boonex/videos/install/sql/install.sql

@@ -85,7 +85,7 @@ CREATE TABLE IF NOT EXISTS `bx_videos_cmts` (
   `cmt_parent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_vparent_id` int(11) NOT NULL DEFAULT '0',
   `cmt_object_id` int(11) NOT NULL DEFAULT '0',
-  `cmt_author_id` int(10) unsigned NOT NULL DEFAULT '0',
+  `cmt_author_id` int(10) NOT NULL DEFAULT '0',
   `cmt_level` int(11) NOT NULL DEFAULT '0',
   `cmt_text` text NOT NULL,
   `cmt_mood` tinyint(4) NOT NULL DEFAULT '0',

+ 1 - 0
template/profile_unit_wo_info_links.html

@@ -0,0 +1 @@
+<bx_include_auto:profile_unit_wo_info.html />

+ 13 - 1
template/scripts/BxBaseCmts.php

@@ -389,6 +389,9 @@ class BxBaseCmts extends BxDolCmts
 
         $sJsObject = $this->getJsObjectName();
 
+        $iUserId = $this->_getAuthorId();
+        $bModerator = $this->isModerator();
+
         $aComments = array_reverse($aComments);
         $iComments = count($aComments);
 
@@ -399,7 +402,15 @@ class BxBaseCmts extends BxDolCmts
             $sShowOnClick = "javascript:" . $sJsObject . ".goTo(this, '" .  $this->getItemAnchor($iCommentId) . "', '" . $iCommentId . "');";
             $sReplyOnClick = "javascript:" . $sJsObject . ".goToAndReply(this, '" . $this->getItemAnchor($iCommentId) . "', '" . $iCommentId . "');";
 
-            $oAuthor = $this->_getAuthorObject($aComment['cmt_author_id']);
+            $iAuthorId = (int)$aComment['cmt_author_id'];
+            if($iAuthorId < 0) {
+                if(abs($iAuthorId) == $iUserId)
+                    continue;
+                else if($bModerator)
+                    $iAuthorId *= -1;
+            }
+
+            $oAuthor = $this->_getAuthorObject($iAuthorId);
             $sAuthorName = $oAuthor->getDisplayName();
 
             $aTmplVarsNotifs[] = array(
@@ -1013,6 +1024,7 @@ class BxBaseCmts extends BxDolCmts
             ),
     	);
     }
+
     protected function _getTmplVarsText($aCmt)
     {
     	$sText = $aCmt['cmt_text'];

+ 26 - 0
template/scripts/BxBaseCmtsForm.php

@@ -56,6 +56,32 @@ class BxBaseCmtsForm extends BxTemplFormView
     {
     	return isset($this->aInputs['cmt_image']['images_transcoder']) ? $this->aInputs['cmt_image']['images_transcoder'] : '';
     }
+    
+    function initChecker ($aValues = array (), $aSpecificValues = array())
+    {
+        if (isset($this->aInputs['cmt_anonymous']) && isset($aValues['cmt_author_id']))
+            $this->aInputs['cmt_anonymous']['checked'] = $aValues['cmt_author_id'] < 0;
+        
+        parent::initChecker ($aValues, $aSpecificValues);
+    }
+    
+    public function insert ($aValsToAdd = array(), $isIgnore = false)
+    {
+        $aValsToAdd['cmt_author_id'] *= isset($this->aInputs['cmt_anonymous']) && $this->getCleanValue('cmt_anonymous') ? -1 : 1;
+
+        return parent::insert ($aValsToAdd, $isIgnore);
+    }
+
+    function update ($iCmtId, $aValsToAdd = array(), &$aTrackTextFieldsChanges = null)
+    {
+        if (isset($this->aInputs['cmt_anonymous'])) {
+            $aCmt = BxDolCmts::getObjectInstance($this->getCleanValue('sys'), $this->getCleanValue('id'))->getCommentRow($iCmtId);
+
+            $aValsToAdd['cmt_author_id'] = ($this->getCleanValue('cmt_anonymous') ? -1 : 1) * abs($aCmt['cmt_author_id']);
+        }
+
+        return parent::update ($iCmtId, $aValsToAdd, $aTrackTextFieldsChanges);
+    }
 }
 
 /** @} */

+ 6 - 1
template/scripts/BxBaseCmtsMenuUnitMeta.php

@@ -74,7 +74,12 @@ class BxBaseCmtsMenuUnitMeta extends BxTemplMenuUnitMeta
 
     protected function _getMenuItemMembership($aItem)
     {
-        $aMembership = BxDolAcl::getInstance()->getMemberMembershipInfo($this->_aCmt['cmt_author_id']);
+        $iUserId = bx_get_logged_profile_id();
+        $iAuthorId = (int)$this->_aCmt['cmt_author_id'];
+        if($iAuthorId < 0  && (abs($iAuthorId) == $iUserId || $this->_oCmts->isModerator()))
+            $iAuthorId *= -1;
+
+        $aMembership = BxDolAcl::getInstance()->getMemberMembershipInfo($iAuthorId);
         if(empty($aMembership) || !is_array($aMembership))
             return '';