فهرست منبع

#3639 - Forums (and other modules too): delete action on management page isn't checked for 'delete' membership action

RomanL 4 سال پیش
والد
کامیت
535ea071ef
1فایلهای تغییر یافته به همراه8 افزوده شده و 1 حذف شده
  1. 8 1
      modules/base/general/classes/BxBaseModGeneralGridAdministration.php

+ 8 - 1
modules/base/general/classes/BxBaseModGeneralGridAdministration.php

@@ -120,6 +120,13 @@ class BxBaseModGeneralGridAdministration extends BxTemplGrid
 		if($this->_sManageType == BX_DOL_MANAGE_TOOLS_ADMINISTRATION && !$this->_oModule->_isAdministrator())
 			return '';
 
+        $CNF = &$this->_oModule->_oConfig->CNF;
+        if (isset($aRow[$CNF['FIELD_ID']])){
+            $aContentInfo = $this->_getContentInfo($aRow[$CNF['FIELD_ID']]);
+            if($this->_oModule->checkAllowedDelete($aContentInfo) !== CHECK_ACTION_RESULT_ALLOWED)
+                return '';
+        }
+        
     	return $this->_getActionDefault($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
     }
 
@@ -259,7 +266,7 @@ class BxBaseModGeneralGridAdministration extends BxTemplGrid
 
     protected function _onDelete($iId, $aParams = array())
     {
-    	return true;
+    	return false;
     }
 
     protected function _getCellSwitcher ($mixedValue, $sKey, $aField, $aRow)