From 95cde2e10fed920f0d5096473d0064a4e1d22fe0 Mon Sep 17 00:00:00 2001 From: Alexander Dietrich Date: Mon, 15 Oct 2018 22:51:46 +0200 Subject: [PATCH] Add UBNT naming, sort models alphabetically --- freifunk-versions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/freifunk-versions.php b/freifunk-versions.php index 93b65bb..197059f 100644 --- a/freifunk-versions.php +++ b/freifunk-versions.php @@ -117,6 +117,7 @@ function ff_hh_shortcode_versions( $atts, $content, $name ) { $outstr = "
"; $outstr .= ''; + ksort($manifest); foreach ( $manifest as $hw => $versions ) { // select some models if ( $grep && ( false === strpos( $hw, $grep ) ) ) { @@ -200,6 +201,12 @@ function ff_hh_beautify_hw_name( $hw, $discard_vendor = '' ) { $hw = str_replace( 'bullet-m', 'bullet-m', $hw ); $hw = str_replace( '-', ' ', $hw ); $hw = ucwords( $hw ); + } elseif ( ! strncmp( $hw, 'ubnt', 4 ) ) { + if ( $discard_vendor ) $hw = str_replace( $discard_vendor, '', $hw ); + $hw = str_replace( 'erx', 'ER-X', $hw ); + $hw = str_replace( 'sfp', 'SFP', $hw ); + $hw = trim( $hw, ' -' ); + $hw = ucwords( $hw ); } elseif ( ! strncmp( $hw, 'd-link', 6 ) ) { if ( $discard_vendor ) $hw = str_replace( $discard_vendor, '', $hw ); $hw = strtoupper( $hw );
ModellErstinstallationAktualisierung