//added condition in processDelete to check list_skip_actions array

This commit is contained in:
vAugagneur committed 2011-11-17 07:54:14 +00:00
1 parent e0ceb7634d
commit 063b1faa08
1 file changed
+2
+2
View File
@@ -481,6 +481,8 @@ class AdminControllerCore extends Controller
' <b>'.$this->table.'</b><br />'. ' <b>'.$this->table.'</b><br />'.
Tools::displayError('You cannot delete all of the items.'); Tools::displayError('You cannot delete all of the items.');
} }
else if (array_key_exists('delete', $this->list_skip_actions) AND in_array($object->id, $this->list_skip_actions['delete'])) //check if some ids are in list_skip_actions and forbid deletion
$this->_errors[] = Tools::displayError('You cannot delete this items.');
else else
{ {
if ($this->deleted) if ($this->deleted)