Only show 3D addresses where necessary
This commit is contained in:
@@ -45,7 +45,17 @@ class Address extends Model
|
||||
*/
|
||||
public function getFTNAttribute()
|
||||
{
|
||||
return sprintf('%d:%d/%d.%d@%s',$this->zone->zone_id,$this->host_id ?: $this->region_id,$this->node_id,$this->point_id,$this->zone->domain->name);
|
||||
return sprintf('%s@%s',$this->getFTN4DAttribute(),$this->zone->domain->name);
|
||||
}
|
||||
|
||||
public function getFTN3DAttribute()
|
||||
{
|
||||
return sprintf('%d:%d/%d',$this->zone->zone_id,$this->host_id ?: $this->region_id,$this->node_id);
|
||||
}
|
||||
|
||||
public function getFTN4DAttribute()
|
||||
{
|
||||
return sprintf('%s.%d',$this->getFTN3DAttribute(),$this->point_id);
|
||||
}
|
||||
|
||||
public function getRoleAttribute($value)
|
||||
|
Reference in New Issue
Block a user