Disabling our routine to set a default on an address, it needs to be improved
This commit is contained in:
parent
9c8e546765
commit
24f6af3d3b
@ -799,11 +799,14 @@ class SystemController extends Controller
|
|||||||
|
|
||||||
$zo = Zone::findOrFail($validate['zone_id']);
|
$zo = Zone::findOrFail($validate['zone_id']);
|
||||||
|
|
||||||
|
/*
|
||||||
|
// @todo Disabling this, it needs improvement. If the new node is the ZC it becomes the default for the zone (and therefore remove all defaults from other addresses in the same zone), otherwise default should be false
|
||||||
// If this session is for the ZC, it now becomes the default.
|
// If this session is for the ZC, it now becomes the default.
|
||||||
if ($o->match($zo,Address::NODE_ZC)->count()) {
|
if ($o->match($zo,Address::NODE_ZC)->count()) {
|
||||||
SystemZone::where('default',TRUE)->update(['default'=>FALSE]);
|
SystemZone::where('default',TRUE)->update(['default'=>FALSE]);
|
||||||
$validate['default'] = TRUE;
|
$validate['default'] = TRUE;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
$o->sessions()->attach($zo,$validate);
|
$o->sessions()->attach($zo,$validate);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user