if path results in an empty string, set it to something so that the link is there when type is vlc

This commit is contained in:
Isaac Connor 2015-02-03 10:52:49 -05:00
parent d2865f625b
commit 2b00ebd02c
1 changed files with 3 additions and 0 deletions

View File

@ -314,6 +314,9 @@ foreach( $displayMonitors as $monitor )
<?php } elseif ( $monitor['Type'] == "Libvlc" ) {
$domain = parse_url( $monitor['Path'], PHP_URL_HOST );
$shortpath = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] );
if ( $shortpath == '' ) {
$shortpath = 'Monitor ' . $monitor['Id'];
}
?>
<td class="colSource"><?php echo makePopupLink( '?view=monitor&amp;mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$shortpath.'</span>', canEdit( 'Monitors' ) ) ?></td>
<?php } elseif ( $monitor['Type'] == "cURL" ) { ?>