From af55ec2a698c2de24be225c4a48fe53f2f762405 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 18 Jan 2015 23:15:39 +0100 Subject: [PATCH] =?UTF-8?q?alle=20strings=20versch=C3=B6nert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freifunk-versions.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/freifunk-versions.php b/freifunk-versions.php index ce5d665..d4d3c30 100644 --- a/freifunk-versions.php +++ b/freifunk-versions.php @@ -148,19 +148,22 @@ function ff_hh_beautify_hw_name( $hw, $discard_vendor = '' ) { $hw = ucwords( $hw ); } elseif ( ! strncmp( $hw, 'd-link', 6 ) ) { if ( $discard_vendor ) $hw = str_replace( $discard_vendor, '', $hw ); + $hw = strtoupper( $hw ); $hw = str_replace( '-', ' ', $hw ); - $hw = str_replace( 'd link ', 'D-Link ', $hw ); - $hw = str_replace( ' dir ', ' DIR-', $hw ); + $hw = str_replace( 'D LINK ', 'D-Link ', $hw ); + $hw = str_replace( ' DIR ', ' DIR-', $hw ); } elseif ( ! strncmp( $hw, 'linksys', 7 ) ) { if ( $discard_vendor ) $hw = str_replace( $discard_vendor, '', $hw ); + $hw = strtoupper( $hw ); $hw = str_replace( '-', ' ', $hw ); - $hw = str_replace( 'linksys ', 'Linksys ', $hw ); - $hw = str_replace( ' wrt', ' WRT-', $hw ); + $hw = str_replace( 'LINKSYS', 'Linksys ', $hw ); + $hw = str_replace( ' WRT', ' WRT-', $hw ); } elseif ( ! strncmp( $hw, 'buffalo', 7 ) ) { if ( $discard_vendor ) $hw = str_replace( $discard_vendor, '', $hw ); - $hw = str_replace( 'buffalo', 'Buffalo', $hw ); - $hw = str_replace( 'hp-ag300h-wzr-600dhp', 'HP-AG300H & WZR-600DHP', $hw ); - $hw = str_replace( '-wzr', 'WZR', $hw ); + $hw = strtoupper( $hw ); + $hw = str_replace('BUFFALO', 'Buffalo', $hw ); + $hw = str_replace( 'HP-AG300H-WZR-600DHP', 'HP-AG300H & WZR-600DHP', $hw ); + $hw = str_replace( '-WZR', 'WZR', $hw ); } return $hw; }