[-] BO : #PSTEST-210 : deleted customers

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11799 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2011-12-27 15:46:21 +00:00
parent 66a0e47042
commit 46fd70b267
3 changed files with 68 additions and 19 deletions
+7 -19
View File
@@ -195,6 +195,13 @@ class AdminCustomersControllerCore extends AdminController
LIMIT 1
) as connect';
if (Tools::isSubmit('submitBulkdelete'.$this->table) OR Tools::isSubmit('delete'.$this->table))
$this->tpl_list_vars = array(
'delete_customer' => true,
'REQUEST_URI' => $_SERVER['REQUEST_URI'],
'POST' => $_POST
);
return parent::renderList();
}
@@ -705,25 +712,6 @@ class AdminCustomersControllerCore extends AdminController
parent::processDelete($token);
}
public function processBulkDelete($token)
{
if ($this->delete_mode == 'real')
{
$this->deleted = false;
foreach (Tools::getValue('customerBox') as $id_customer)
Discount::deleteByIdCustomer((int)$id_customer);
}
elseif ($this->delete_mode == 'deleted')
$this->deleted = true;
else
{
$this->_errors[] = Tools::displayError('Unknown delete mode:'.' '.$this->deleted);
return;
}
parent::processBulkDelete($token);
}
public function processSave($token)
{
// Check that the new email is not already in use