Netgear, ALLNET & Gl.iNet hinzugefügt

This commit is contained in:
root 2015-05-31 17:40:57 +02:00
parent af55ec2a69
commit 2d0e184f81

View file

@ -10,7 +10,7 @@ Licence: 2-clause BSD
*/ */
define( 'FF_HH_STABLE_BASEDIR', 'http://updates.hamburg.freifunk.net/stable/' ); define( 'FF_HH_STABLE_BASEDIR', 'http://updates.hamburg.freifunk.net/stable/' );
define( 'FF_HH_CACHETIME', 15 ); define( 'FF_HH_CACHETIME', 1 );
/* gets metadata from URL, handles caching */ /* gets metadata from URL, handles caching */
function ff_hh_getmanifest( $basedir ) { function ff_hh_getmanifest( $basedir ) {
@ -164,6 +164,20 @@ function ff_hh_beautify_hw_name( $hw, $discard_vendor = '' ) {
$hw = str_replace('BUFFALO', 'Buffalo', $hw ); $hw = str_replace('BUFFALO', 'Buffalo', $hw );
$hw = str_replace( 'HP-AG300H-WZR-600DHP', 'HP-AG300H & WZR-600DHP', $hw ); $hw = str_replace( 'HP-AG300H-WZR-600DHP', 'HP-AG300H & WZR-600DHP', $hw );
$hw = str_replace( '-WZR', 'WZR', $hw ); $hw = str_replace( '-WZR', 'WZR', $hw );
} elseif ( ! strncmp( $hw, 'netgear', 7 ) ) {
if ( $discard_vendor ) $hw = str_replace( $discard_vendor, '', $hw );
$hw = strtoupper( $hw );
$hw = str_replace('NETGEAR', 'Netgear', $hw );
$hw = str_replace( '-', '', $hw );
} elseif ( ! strncmp( $hw, 'allnet', 6 ) ) {
if ( $discard_vendor ) $hw = str_replace( $discard_vendor, '', $hw );
$hw = strtoupper( $hw );
$hw = str_replace( '-', '', $hw );
} elseif ( ! strncmp( $hw, 'gl-inet', 7 ) ) {
if ( $discard_vendor ) $hw = str_replace( $discard_vendor, '', $hw );
$hw = strtoupper( $hw );
$hw = str_replace('GL-INET', 'Gl.iNet', $hw );
$hw = str_replace( '-', '', $hw );
} }
return $hw; return $hw;
} }