mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Url.php: Allow findOsImage() to also use the first two words of $feature * LibreNMS is not always using the bunded redhat.svg. * Modern RHEL has /etc/os-release and distro ends up using it. * The lsb release is correct, i.e. 'Red Hat Enterprise Linux Server 7.6' * Previously, findOsImage() only considered the first word of $feature as a possibility for the icon. * This patch allows using the first two words (with the space removed) * i.e. 'Red Hat' becomes 'redhat' and findOsImage uses the bundled redhat.svg * Url.php: use null as an argument rather than '' * Url.php: only replaceFirst if there is a space in $feature