diff --git a/web/includes/functions.php b/web/includes/functions.php index 4a134743d..49896dbfe 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -19,11 +19,11 @@ // // Compatibility functions -if ( version_compare( phpversion(), '4.3.0', '<') ) { +if ( version_compare(phpversion(), '4.3.0', '<') ) { function ob_get_clean() { $buffer = ob_get_contents(); ob_end_clean(); - return( $buffer ); + return $buffer; } } @@ -36,7 +36,7 @@ function noCacheHeaders() { } function CSPHeaders($view, $nonce) { - $additionalScriptSrc = ""; + $additionalScriptSrc = ''; switch ($view) { case 'login': { if (defined('ZM_OPT_USE_GOOG_RECAPTCHA') @@ -101,14 +101,14 @@ function CORSHeaders() { } return; } - foreach( $Servers as $Server ) { + foreach ( $Servers as $Server ) { if ( preg_match('/^(https?:\/\/)?'.preg_quote($Server->Hostname(),'/').'/i', $_SERVER['HTTP_ORIGIN']) or preg_match('/^(https?:\/\/)?'.preg_quote($Server->Name(),'/').'/i', $_SERVER['HTTP_ORIGIN']) ) { $valid = true; - ZM\Logger::Debug("Setting Access-Control-Allow-Origin from " . $_SERVER['HTTP_ORIGIN']); + ZM\Logger::Debug('Setting Access-Control-Allow-Origin from '.$_SERVER['HTTP_ORIGIN']); header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']); header('Access-Control-Allow-Headers: x-requested-with,x-request'); break; @@ -122,21 +122,21 @@ function CORSHeaders() { function getMimeType( $file ) { if ( function_exists('mime_content_type') ) { - return( mime_content_type( $file ) ); + return mime_content_type($file); } elseif ( function_exists('finfo_file') ) { - $finfo = finfo_open( FILEINFO_MIME ); - $mimeType = finfo_file( $finfo, $file ); + $finfo = finfo_open(FILEINFO_MIME); + $mimeType = finfo_file($finfo, $file); finfo_close($finfo); - return( $mimeType ); + return $mimeType; } return trim(exec('file -bi '.escapeshellarg($file).' 2>/dev/null')); } -function outputVideoStream( $id, $src, $width, $height, $format, $title='' ) { - echo getVideoStreamHTML( $id, $src, $width, $height, $format, $title ); +function outputVideoStream($id, $src, $width, $height, $format, $title='') { + echo getVideoStreamHTML($id, $src, $width, $height, $format, $title); } -function getVideoStreamHTML( $id, $src, $width, $height, $format, $title='' ) { +function getVideoStreamHTML($id, $src, $width, $height, $format, $title='') { $html = ''; $width = validInt($width); $height = validInt($height); @@ -259,7 +259,7 @@ function getImageStreamHTML( $id, $src, $width, $height, $title='' ) { } } -function outputControlStream( $src, $width, $height, $monitor, $scale, $target ) { +function outputControlStream($src, $width, $height, $monitor, $scale, $target) { ?>