put back the preg_replace that strips usernames and passwords from monitor source

This commit is contained in:
Isaac Connor 2017-07-26 10:22:57 -04:00
parent 342aacd94f
commit 1cfd657168
1 changed files with 6 additions and 6 deletions

View File

@ -255,16 +255,16 @@ echo $Server->Name();
<?php
}
$source = '';
if ( $monitor['Type'] == "Local" ) {
if ( $monitor['Type'] == 'Local' ) {
$source = $monitor['Device'].' ('.$monitor['Channel'].')';
} elseif ( $monitor['Type'] == "Remote" ) {
$source = $monitor['Host'];
} elseif ( $monitor['Type'] == "File" || $monitor['Type'] == "cURL" ) {
} elseif ( $monitor['Type'] == 'Remote' ) {
$source = preg_replace( '/^.*@/', '', $monitor['Host'] );
} elseif ( $monitor['Type'] == 'File' || $monitor['Type'] == 'cURL' ) {
$source = preg_replace( '/^.*\//', '', $monitor['Path'] );
} elseif ( $monitor['Type'] == "Ffmpeg" || $monitor['Type'] == "Libvlc" ) {
} elseif ( $monitor['Type'] == 'Ffmpeg' || $monitor['Type'] == 'Libvlc' ) {
$domain = parse_url( $monitor['Path'], PHP_URL_HOST );
$source = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] );
} elseif ( $monitor['Type'] == "cURL" ) {
} elseif ( $monitor['Type'] == 'cURL' ) {
}
if ( $source == '' ) {