FIX: Bad variable usage

This commit is contained in:
Raphaël Doursenaud 2014-09-18 11:38:01 +02:00 committed by Raphaël Doursenaud
parent 2b602e7b5a
commit d0f83141fb

View File

@ -65,8 +65,7 @@ if ($action == 'delete') {
$accounting = new AccountingAccount($db);
if ($action == 'disable') {
$accounting = $accounting->fetch($id);
if (! empty($accounting->id)) {
if ($accounting->fetch($id)) {
$result = $accounting->account_desactivate($id);
}
@ -75,10 +74,7 @@ if ($action == 'disable') {
setEventMessage($accounting->error, 'errors');
}
} else if ($action == 'enable') {
$accounting = $accounting->fetch($id);
if (! empty($accounting->id)) {
if ($accounting->fetch($id)) {
$result = $accounting->account_activate($id);
}
$action = 'update';
@ -206,4 +202,4 @@ if ($result) {
}
llxFooter();
$db->close();
$db->close();