From aab257897cc02047ce530a97d1f8a8c9820d094a Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 11 Apr 2022 09:43:45 -0400 Subject: [PATCH] Ensure rate is an integer when coming from cookie. Remove commented out rate display. --- web/skins/classic/views/event.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web/skins/classic/views/event.php b/web/skins/classic/views/event.php index e352f305b..89f331501 100644 --- a/web/skins/classic/views/event.php +++ b/web/skins/classic/views/event.php @@ -39,10 +39,10 @@ if ( $user['MonitorIds'] ) { } $Monitor = $Event->Monitor(); -if ( isset($_REQUEST['rate']) ) { +if (isset($_REQUEST['rate'])) { $rate = validInt($_REQUEST['rate']); -} else if ( isset($_COOKIE['zmEventRate']) ) { - $rate = $_COOKIE['zmEventRate']; +} else if (isset($_COOKIE['zmEventRate'])) { + $rate = validInt($_COOKIE['zmEventRate']); } else { $rate = reScale(RATE_BASE, $Monitor->DefaultRate(), ZM_WEB_DEFAULT_RATE); } @@ -271,7 +271,6 @@ if ( (ZM_WEB_STREAM_METHOD == 'mpeg') && ZM_MPEG_LIVE_FORMAT ) { #rates are defined in skins/classic/includes/config.php echo htmlSelect('rate', $rates, intval($rate), array('id'=>'rateValue')); ?> - : 0s : 1x