Fixed nulled organisation name
This commit is contained in:
@@ -359,10 +359,10 @@ class OrganisationController extends SimpleController
|
|||||||
throw new NotFoundException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Begin transaction - DB will be rolled back if an exception occurs
|
$sourceName = $source->name;
|
||||||
Capsule::transaction(function () use ($source, $target, $currentUser) {
|
|
||||||
$sourceName = $source->name;
|
|
||||||
|
|
||||||
|
// Begin transaction - DB will be rolled back if an exception occurs
|
||||||
|
Capsule::transaction(function () use ($source, $target, $currentUser, $sourceName) {
|
||||||
$this->ci->get('organisation.beforeMerge')($source, $target);
|
$this->ci->get('organisation.beforeMerge')($source, $target);
|
||||||
|
|
||||||
$source->beforeMerge($target, ['currentUser' => $currentUser]);
|
$source->beforeMerge($target, ['currentUser' => $currentUser]);
|
||||||
@@ -431,10 +431,10 @@ class OrganisationController extends SimpleController
|
|||||||
throw new ForbiddenException();
|
throw new ForbiddenException();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Begin transaction - DB will be rolled back if an exception occurs
|
$organisationName = $organisation->name;
|
||||||
Capsule::transaction(function () use ($organisation, $currentUser) {
|
|
||||||
$organisationName = $organisation->name;
|
|
||||||
|
|
||||||
|
// Begin transaction - DB will be rolled back if an exception occurs
|
||||||
|
Capsule::transaction(function () use ($organisation, $currentUser, $organisationName) {
|
||||||
// Delete the organisation (soft)
|
// Delete the organisation (soft)
|
||||||
$organisation->delete();
|
$organisation->delete();
|
||||||
unset($organisation);
|
unset($organisation);
|
||||||
|
|||||||
@@ -206,10 +206,10 @@ class OrganisationRegistrationController extends SimpleController
|
|||||||
throw new ForbiddenException();
|
throw new ForbiddenException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$organisationName = $organisation->name;
|
||||||
|
|
||||||
// Begin transaction - DB will be rolled back if an exception occurs
|
// Begin transaction - DB will be rolled back if an exception occurs
|
||||||
Capsule::transaction(function () use ($organisation, $currentUser) {
|
Capsule::transaction(function () use ($organisation, $currentUser, $organisationName) {
|
||||||
$organisationName = $organisation->name;
|
|
||||||
|
|
||||||
// Delete the organisation
|
// Delete the organisation
|
||||||
$organisation->delete(true);
|
$organisation->delete(true);
|
||||||
unset($organisation);
|
unset($organisation);
|
||||||
|
|||||||
Reference in New Issue
Block a user