From 7dd95f6afe982c7bbceafcade2ba5b422169619f Mon Sep 17 00:00:00 2001 From: digital-gnome <31593470+digital-gnome@users.noreply.github.com> Date: Mon, 25 Sep 2017 20:33:50 -0400 Subject: [PATCH 1/3] getNearEvents prev always 0 getNearEvents always returns 0 for prev event. sortColumn is escaped with passes it with single quotes and breaks the query. I changed it to match next event by removing the escape. --- web/ajax/status.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/ajax/status.php b/web/ajax/status.php index fbd91cf08..84399989d 100644 --- a/web/ajax/status.php +++ b/web/ajax/status.php @@ -367,7 +367,7 @@ function getNearEvents() { else $midSql = ''; - $sql = "select E.Id as Id from Events as E inner join Monitors as M on E.MonitorId = M.Id where ".dbEscape($sortColumn)." ".($sortOrder=='asc'?'<=':'>=')." '".$event[$_REQUEST['sort_field']]."'".$_REQUEST['filter']['sql'].$midSql." order by $sortColumn ".($sortOrder=='asc'?'desc':'asc'); + $sql = "select E.Id as Id from Events as E inner join Monitors as M on E.MonitorId = M.Id where $sortColumn ".($sortOrder=='asc'?'<=':'>=')." '".$event[$_REQUEST['sort_field']]."'".$_REQUEST['filter']['sql'].$midSql." order by $sortColumn ".($sortOrder=='asc'?'desc':'asc'); $result = dbQuery( $sql ); while ( $id = dbFetchNext( $result, 'Id' ) ) { if ( $id == $eventId ) { From cc4b6cd0b0bcb6c154cde69fcef2d275cc2b307c Mon Sep 17 00:00:00 2001 From: digital-gnome <31593470+digital-gnome@users.noreply.github.com> Date: Mon, 25 Sep 2017 20:31:50 -0400 Subject: [PATCH 2/3] switch to jquery switched both scaleslider and speedslider to jquery --- web/skins/classic/views/js/montagereview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/views/js/montagereview.js b/web/skins/classic/views/js/montagereview.js index 214b1748b..78dfbb937 100644 --- a/web/skins/classic/views/js/montagereview.js +++ b/web/skins/classic/views/js/montagereview.js @@ -492,7 +492,7 @@ function clicknav(minSecs,maxSecs,arch,live) {// we use the current time if we c if ( monitorZoomScale[monitorPtr[i]] < 0.99 || monitorZoomScale[monitorPtr[i]] > 1.01 ) // allow for some up/down changes and just treat as 1 of almost 1 zoomStr += "&z" + monitorPtr[i].toString() + "=" + monitorZoomScale[monitorPtr[i]].toFixed(2); - var uri = "?view=" + currentView + fitStr + groupStr + minStr + maxStr + currentStr + intervalStr + liveStr + zoomStr + "&scale=" + document.getElementById("scaleslider").value + "&speed=" + document.getElementById("speedslider").value; + var uri = "?view=" + currentView + fitStr + groupStr + minStr + maxStr + currentStr + intervalStr + liveStr + zoomStr + "&scale=" + scale[$j("#scaleslider")[0].value] + "&speed=" + speeds[$j("#speedslider")[0].value]; window.location = uri; } From 00c33aa758e64cfcb0da391ff4ee34f91eb85c01 Mon Sep 17 00:00:00 2001 From: digital-gnome <31593470+digital-gnome@users.noreply.github.com> Date: Mon, 25 Sep 2017 20:30:16 -0400 Subject: [PATCH 3/3] remove extra /div I somehow let an extra /div slip into the commit for making archive work. --- web/skins/classic/views/event.php | 1 - 1 file changed, 1 deletion(-) diff --git a/web/skins/classic/views/event.php b/web/skins/classic/views/event.php index b4ee322d0..e9e29f33b 100644 --- a/web/skins/classic/views/event.php +++ b/web/skins/classic/views/event.php @@ -132,7 +132,6 @@ if ( canEdit( 'Events' ) ) {
- DefaultVideo() ) { ?>