AntonLV 8 лет назад
Родитель
Сommit
e30840cd8f

+ 2 - 1
modules/boonex/russian/data/langs/bx_timeline/ru.xml

@@ -4,7 +4,8 @@
 	<string name="_bx_timeline"><![CDATA[Лента]]></string>
 	<string name="_bx_timeline_cmts"><![CDATA[Лента - Комментарии]]></string>
 
-	<string name="_bx_timeline_option_enable_delete"><![CDATA[Разрешить пользователю ленты удалять элементы]]></string>
+    <string name="_bx_timeline_option_enable_edit"><![CDATA[Разрешить пользователю изменять собственные сообщения]]></string>
+	<string name="_bx_timeline_option_enable_delete"><![CDATA[Разрешить владельцу ленты удалять сообщения]]></string>
 	<string name="_bx_timeline_option_events_per_page_profile"><![CDATA[Количество элементов на странице профайла]]></string>
 	<string name="_bx_timeline_option_events_per_page_account"><![CDATA[Количество элементов на странице "панель аккаунта"]]></string>
 	<string name="_bx_timeline_option_events_per_page_home"><![CDATA[Количество элементов на главной странице сайта]]></string>

+ 1 - 6
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -1640,7 +1640,7 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         $iUserId = (int)$this->getUserId();
         $iOwnerId = (int)$aEvent['owner_id'];
         $iObjectId = (int)$aEvent['object_id'];
-        if((($iOwnerId == $iUserId) || ($iOwnerId == 0 && $this->_oConfig->isCommon($aEvent['type'], $aEvent['action']) && $iObjectId == $iUserId)) && $this->_oConfig->isAllowDelete())
+        if((($iOwnerId == $iUserId && $this->_oConfig->isAllowDelete()) || ($this->_oConfig->isCommon($aEvent['type'], $aEvent['action']) && $iObjectId == $iUserId)))
            return true;
 
         $aCheckResult = checkActionModule($iUserId, 'delete', $this->getName(), $bPerform);
@@ -1652,11 +1652,6 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $aCheckResult[CHECK_ACTION_RESULT] !== CHECK_ACTION_RESULT_ALLOWED ? $aCheckResult[CHECK_ACTION_MESSAGE] : true;
     }
 
-    protected function _isAllowedModerate($sAction, $aEvent, $bPerform = false)
-    {
-        
-    }
-
     public function isAllowedComment($aEvent, $bPerform = false)
     {
         $mixedComments = $this->getCommentsData($aEvent['comments']);

+ 1 - 1
modules/boonex/timeline/install/langs/en.xml

@@ -4,7 +4,7 @@
 	<string name="_bx_timeline"><![CDATA[Timeline]]></string>
 	<string name="_bx_timeline_cmts"><![CDATA[Timelines' Comments]]></string>
 
-    <string name="_bx_timeline_option_enable_edit"><![CDATA[Allow Timeline owner to edit items]]></string>
+    <string name="_bx_timeline_option_enable_edit"><![CDATA[Allow user to edit his items]]></string>
 	<string name="_bx_timeline_option_enable_delete"><![CDATA[Allow Timeline owner to remove items]]></string>
 	<string name="_bx_timeline_option_events_per_page_profile"><![CDATA[Number of items on profile page]]></string>
 	<string name="_bx_timeline_option_events_per_page_account"><![CDATA[Number of items on dashboard page]]></string>