From 68521aa0d47be3fec9bba8f86abb316cb8815e42 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 10:27:50 -0500 Subject: [PATCH] spacing, remove debug lines --- web/includes/actions.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/includes/actions.php b/web/includes/actions.php index 4e0829e03..3c55af3db 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -484,19 +484,18 @@ if ( canEdit( 'Monitors' ) ) { ); if ( $_REQUEST['newMonitor']['ServerId'] == 'auto' ) { -Logger::Debug("Auto selecting server"); + Logger::Debug("Auto selecting server"); $_REQUEST['newMonitor']['ServerId'] = dbFetchOne( 'SELECT Id FROM Servers WHERE Status=\'Running\' ORDER BY FreeMem ASC, CpuLoad ASC LIMIT 1', 'Id' ); -Logger::Debug("Auto selecting server: Got " . $_REQUEST['newMonitor']['ServerId'] ); + Logger::Debug("Auto selecting server: Got " . $_REQUEST['newMonitor']['ServerId'] ); if ( ( ! $_REQUEST['newMonitor'] ) and defined('ZM_SERVER_ID') ) { $_REQUEST['newMonitor']['ServerId'] = ZM_SERVER_ID; -Logger::Debug("Auto selecting server to " . ZM_SERVER_ID); + Logger::Debug("Auto selecting server to " . ZM_SERVER_ID); } } else { Logger::Debug("NOT Auto selecting server" . $_REQUEST['newMonitor']['ServerId']); } $columns = getTableColumns( 'Monitors' ); -Logger::Debug('coloumns:'.print_r($columns)); $changes = getFormChanges( $monitor, $_REQUEST['newMonitor'], $types, $columns ); if ( count( $changes ) ) { @@ -553,7 +552,7 @@ Logger::Debug('coloumns:'.print_r($columns)); $restart = true; } else if ( ! $user['MonitorIds'] ) { // Can only create new monitors if we are not restricted to specific monitors # FIXME This is actually a race condition. Should lock the table. - $maxSeq = dbFetchOne( 'SELECT max(Sequence) AS MaxSequence FROM Monitors', 'MaxSequence' ); + $maxSeq = dbFetchOne('SELECT MAX(Sequence) AS MaxSequence FROM Monitors', 'MaxSequence'); $changes[] = 'Sequence = '.($maxSeq+1); if ( dbQuery( 'INSERT INTO Monitors SET '.implode( ', ', $changes ) ) ) {