From df8fbacceacf7ae02cbd683f7dba6f506fdf2bdf Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 23 Oct 2017 11:50:45 -0700 Subject: [PATCH] Fixes --- web/includes/Event.php | 2 +- web/includes/Storage.php | 2 +- web/skins/classic/views/js/montagereview.js | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/includes/Event.php b/web/includes/Event.php index f43973e7f..ada81a00f 100644 --- a/web/includes/Event.php +++ b/web/includes/Event.php @@ -381,7 +381,7 @@ class Event { public function save( ) { $sql = 'UPDATE Events SET '.implode(' AND', array_map( function($field) {return $field.'=?';}, $fields ) ) . ' WHERE Id=?'; - $values = array_map( function($field){return $this->{$field}}, $fields ); + $values = array_map( function($field){return $this->{$field};}, $fields ); $values[] = $this->{'Id'}; dbQuery( $sql, NULL, $values ); } diff --git a/web/includes/Storage.php b/web/includes/Storage.php index 68d2e516e..cc52b5c65 100644 --- a/web/includes/Storage.php +++ b/web/includes/Storage.php @@ -113,7 +113,7 @@ class Storage { if ( ! array_key_exists( 'disk_used_space', $this ) ) { $used = 0; if ( $this->{'Type'} == 's3fs' ) { - $used = dbFetchOne('SELECT SUM(DiskSpace) FROM EVents WHERE StorageId=? AND DiskSpace IS NOT NULL', 'DiskSpace', array($this-Id()) ); + $used = dbFetchOne('SELECT SUM(DiskSpace) AS DiskSpace FROM Events WHERE StorageId=? AND DiskSpace IS NOT NULL', 'DiskSpace', array($this->Id()) ); foreach ( Event::find_all( array( 'StorageId'=>$this->Id(), 'DiskSpace'=>null ) ) as $Event ) { $Event->Storage( $this ); // Prevent further db hit diff --git a/web/skins/classic/views/js/montagereview.js b/web/skins/classic/views/js/montagereview.js index 1090fbf4e..f208ffb82 100644 --- a/web/skins/classic/views/js/montagereview.js +++ b/web/skins/classic/views/js/montagereview.js @@ -140,13 +140,14 @@ function loadImage2Monitor( monId, url ) { if ( url == 'no data' ) { writeText(monId, 'No Data'); } else { - writeText(monId, 'Loading...'); + //writeText(monId, 'Loading...'); monitorLoading[monId] = true; monitorLoadStartTimems[monId] = new Date().getTime(); monitorImageObject[monId].src = url; // starts a load but doesn't refresh yet, wait until ready } } } + function timerFire() { // See if we need to reschedule if ( currentDisplayInterval != timerInterval || currentSpeed == 0 ) {