Merge pull request #813 from abhishek-webkul/gli-1084
Fixed: Success message is not displayed for bulk status updates in a list at back office
This commit is contained in:
@@ -4018,9 +4018,23 @@ class AdminControllerCore extends Controller
|
||||
$object = new $this->className((int)$id);
|
||||
$object->setFieldsToUpdate(array('active' => true));
|
||||
$object->active = (int)$status;
|
||||
$result &= $object->update();
|
||||
$isUpdated = (bool) $object->update();
|
||||
$result &= $isUpdated;
|
||||
|
||||
if (!$isUpdated) {
|
||||
$this->errors[] = sprintf($this->l('Can\'t update #%d status.'), (int) $id);
|
||||
}
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
$this->redirect_after = self::$currentIndex.'&conf=5&token='.$this->token;
|
||||
} else {
|
||||
$this->errors[] = $this->l('An error occurred while updating the status.');
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = $this->l('You must select at least one item to perform a bulk action.');
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user