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:
parent
d2865f625b
commit
2b00ebd02c
|
@ -314,6 +314,9 @@ foreach( $displayMonitors as $monitor )
|
||||||
<?php } elseif ( $monitor['Type'] == "Libvlc" ) {
|
<?php } elseif ( $monitor['Type'] == "Libvlc" ) {
|
||||||
$domain = parse_url( $monitor['Path'], PHP_URL_HOST );
|
$domain = parse_url( $monitor['Path'], PHP_URL_HOST );
|
||||||
$shortpath = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] );
|
$shortpath = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] );
|
||||||
|
if ( $shortpath == '' ) {
|
||||||
|
$shortpath = 'Monitor ' . $monitor['Id'];
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
<td class="colSource"><?php echo makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$shortpath.'</span>', canEdit( 'Monitors' ) ) ?></td>
|
<td class="colSource"><?php echo makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$shortpath.'</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||||
<?php } elseif ( $monitor['Type'] == "cURL" ) { ?>
|
<?php } elseif ( $monitor['Type'] == "cURL" ) { ?>
|
||||||
|
|
Loading…
Reference in New Issue