mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 14:03:27 +00:00
Merge pull request #1100 from nlegoff/fix-146
[READY][3.8.6][PHRAS-146] Order of a basket generates an error when the content come...
This commit is contained in:
@@ -155,9 +155,10 @@ class Order implements ControllerProviderInterface
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$records = RecordsRequest::fromRequest($app, $request, true, array('cancmd'));
|
$records = RecordsRequest::fromRequest($app, $request, true, array('cancmd'));
|
||||||
$query = new \User_Query($app);
|
|
||||||
|
|
||||||
foreach ($records as $key => $record) {
|
foreach ($records as $key => $record) {
|
||||||
|
$query = new \User_Query($app);
|
||||||
|
|
||||||
if ($collectionHasOrderAdmins->containsKey($record->get_base_id())) {
|
if ($collectionHasOrderAdmins->containsKey($record->get_base_id())) {
|
||||||
if (!$collectionHasOrderAdmins->get($record->get_base_id())) {
|
if (!$collectionHasOrderAdmins->get($record->get_base_id())) {
|
||||||
$records->remove($key);
|
$records->remove($key);
|
||||||
@@ -182,8 +183,8 @@ class Order implements ControllerProviderInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
$noAdmins = $collectionHasOrderAdmins->forAll(function ($key, $hasAdmin) {
|
$noAdmins = $collectionHasOrderAdmins->forAll(function ($key, $hasAdmin) {
|
||||||
return false === $hasAdmin;
|
return false === $hasAdmin;
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($noAdmins) {
|
if ($noAdmins) {
|
||||||
$msg = _('There is no one to validate orders, please contact an administrator');
|
$msg = _('There is no one to validate orders, please contact an administrator');
|
||||||
|
Reference in New Issue
Block a user