Compare commits
2 Commits
33a97ce5b3
...
e1ed446f3e
Author | SHA1 | Date | |
---|---|---|---|
e1ed446f3e | |||
445dd48c81 |
@ -74,18 +74,27 @@ final class Dynamic extends Send
|
|||||||
$this->do->next_at = $next_at
|
$this->do->next_at = $next_at
|
||||||
->addDay();
|
->addDay();
|
||||||
|
|
||||||
|
while ($this->do->next_at->isPast())
|
||||||
|
$this->do->next_at->addDay();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'WEEKLY':
|
case 'WEEKLY':
|
||||||
$this->do->next_at = $next_at
|
$this->do->next_at = $next_at
|
||||||
->addWeek();
|
->addWeek();
|
||||||
|
|
||||||
|
while ($this->do->next_at->isPast())
|
||||||
|
$this->do->next_at->addWeek();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'MONTHLY':
|
case 'MONTHLY':
|
||||||
$this->do->next_at = $next_at
|
$this->do->next_at = $next_at
|
||||||
->addMonth();
|
->addMonth();
|
||||||
|
|
||||||
|
while ($this->do->next_at->isPast())
|
||||||
|
$this->do->next_at->addMonth();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -427,17 +427,13 @@ class Address extends Model
|
|||||||
->join('zones',['zones.id'=>'addresses.zone_id'])
|
->join('zones',['zones.id'=>'addresses.zone_id'])
|
||||||
->join('domains',['domains.id'=>'zones.domain_id'])
|
->join('domains',['domains.id'=>'zones.domain_id'])
|
||||||
->orderBy('domains.name')
|
->orderBy('domains.name')
|
||||||
->orderBy('region_id')
|
->FTNorder()
|
||||||
->orderBy('host_id')
|
|
||||||
->orderBy('node_id')
|
|
||||||
->orderBy('point_id')
|
|
||||||
->with([
|
->with([
|
||||||
'zone:zones.id,domain_id,zone_id,active',
|
'zone:zones.id,domain_id,zone_id,active',
|
||||||
'zone.domain:domains.id,name,active,public',
|
'zone.domain:domains.id,name,active,public',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @deprecated use FTN() */
|
|
||||||
public function scopeFTNOrder($query)
|
public function scopeFTNOrder($query)
|
||||||
{
|
{
|
||||||
return $query
|
return $query
|
||||||
@ -971,6 +967,7 @@ class Address extends Model
|
|||||||
->where('host_id',$this->host_id)
|
->where('host_id',$this->host_id)
|
||||||
->where('hub_id',$this->id)
|
->where('hub_id',$this->id)
|
||||||
->where('id','<>',$this->id)
|
->where('id','<>',$this->id)
|
||||||
|
->FTNorder()
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
// Need to add in points of this hub's nodes
|
// Need to add in points of this hub's nodes
|
||||||
@ -981,6 +978,7 @@ class Address extends Model
|
|||||||
->where('host_id',$this->host_id)
|
->where('host_id',$this->host_id)
|
||||||
->whereIn('node_id',$o->pluck('node_id'))
|
->whereIn('node_id',$o->pluck('node_id'))
|
||||||
->where('point_id','<>',0)
|
->where('point_id','<>',0)
|
||||||
|
->FTNorder()
|
||||||
->get()
|
->get()
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1011,6 +1009,7 @@ class Address extends Model
|
|||||||
|
|
||||||
return $o
|
return $o
|
||||||
->where('id','<>',$this->id)
|
->where('id','<>',$this->id)
|
||||||
|
->FTNorder()
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user