fix type in htmlSelect

This commit is contained in:
Isaac Connor 2016-04-01 15:43:40 -04:00
parent d71eaa66ec
commit 8a2605578a
1 changed files with 3 additions and 2 deletions

View File

@ -514,7 +514,7 @@ function getEventPath( $event )
function getEventDefaultVideoPath( $event ) { function getEventDefaultVideoPath( $event ) {
$Event = new Event( $event ); $Event = new Event( $event );
return $Event->getStreamSrc( array( "mode=mpeg" ) ); return $Event->getStreamSrc( array( "mode=mpeg&format=h264" ) );
//$Event->Path().'/'.$event['DefaultVideo']; //$Event->Path().'/'.$event['DefaultVideo'];
} }
@ -599,7 +599,7 @@ function truncText( $text, $length, $deslash=1 )
return( preg_replace( "/^(.{".$length.",}?)\b.*$/", "\\1…", ($deslash?stripslashes($text):$text) ) ); return( preg_replace( "/^(.{".$length.",}?)\b.*$/", "\\1…", ($deslash?stripslashes($text):$text) ) );
} }
function htmlSelect( $name, $contents, $values, $behaviors=false ) { function htmlSelect( $name, $contents, $values, $behaviours=false ) {
$behaviourText = ""; $behaviourText = "";
if ( !empty($behaviours) ) { if ( !empty($behaviours) ) {
@ -611,6 +611,7 @@ function htmlSelect( $name, $contents, $values, $behaviors=false ) {
$behaviourText = ' onchange="'.$behaviours.'"'; $behaviourText = ' onchange="'.$behaviours.'"';
} }
} }
$html = "<select name=\"$name\" id=\"$name\"$behaviourText>"; $html = "<select name=\"$name\" id=\"$name\"$behaviourText>";
foreach ( $contents as $value=>$text ) { foreach ( $contents as $value=>$text ) {
$selected = is_array( $values ) ? in_array( $value, $values ) : $value==$values; $selected = is_array( $values ) ? in_array( $value, $values ) : $value==$values;