mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
refactor: Allow setting the target shorthost length. (#7453)
* Create a target shorthost length. Addresses #7452. * Update defaults.inc.php
This commit is contained in:
committed by
Neil Lathwood
parent
3f27357951
commit
fe8d011dce
@@ -86,6 +86,7 @@ function shorthost($hostname, $len = 12)
|
||||
if (filter_var($hostname, FILTER_VALIDATE_IP)) {
|
||||
return $hostname;
|
||||
}
|
||||
$len = Config::get('shorthost_target_length', $len);
|
||||
|
||||
$parts = explode(".", $hostname);
|
||||
$shorthost = $parts[0];
|
||||
|
Reference in New Issue
Block a user