From 780cff41cf027abacb8ad088b3e1a36969087cc6 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 24 Jan 2018 10:08:45 -0500 Subject: [PATCH 01/19] fix regression --- scripts/zmaudit.pl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/zmaudit.pl.in b/scripts/zmaudit.pl.in index 78373c2c8..519e80851 100644 --- a/scripts/zmaudit.pl.in +++ b/scripts/zmaudit.pl.in @@ -395,11 +395,11 @@ MAIN: while( $loop ) { while ( my ( $db_event, $age ) = each( %$db_events ) ) { if ( ! defined( $fs_events->{$db_event} ) ) { my $Event = ZoneMinder::Event->find_one( Id=>$db_event ); - Debug("Event $db_event is not in fs. Should have been at ".$Event->Path()); if ( ! $Event ) { Debug("Event $db_event is no longer in db. Filter probably deleted it while we were auditing."); next; } + Debug("Event $db_event is not in fs. Should have been at ".$Event->Path()); if ( ! $Event->StartTime() ) { Info("Event $$Event{Id} has no start time. deleting it."); if ( confirm() ) { From 212882efb998c1ad3818e1d7ba00d2d4eb01c165 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 1 Feb 2018 11:31:25 -0500 Subject: [PATCH 02/19] db errors should NOT BE FATAL! --- web/includes/database.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/includes/database.php b/web/includes/database.php index 1fb18f0e8..dfe7f4817 100644 --- a/web/includes/database.php +++ b/web/includes/database.php @@ -98,7 +98,7 @@ function dbLog( $sql, $update=false ) { } function dbError( $sql ) { - Fatal( "SQL-ERR '".$dbConn->errorInfo()."', statement was '".$sql."'" ); + Error( "SQL-ERR '".$dbConn->errorInfo()."', statement was '".$sql."'" ); } function dbEscape( $string ) { @@ -150,7 +150,7 @@ function dbQuery( $sql, $params=NULL ) { function dbFetchOne( $sql, $col=false, $params=NULL ) { $result = dbQuery( $sql, $params ); if ( ! $result ) { - Fatal( "SQL-ERR dbFetchOne no result, statement was '".$sql."'" . ( $params ? 'params: ' . join(',',$params) : '' ) ); + Error( "SQL-ERR dbFetchOne no result, statement was '".$sql."'" . ( $params ? 'params: ' . join(',',$params) : '' ) ); return false; } @@ -169,7 +169,7 @@ function dbFetchOne( $sql, $col=false, $params=NULL ) { function dbFetchAll( $sql, $col=false, $params=NULL ) { $result = dbQuery( $sql, $params ); if ( ! $result ) { - Fatal( "SQL-ERR dbFetchAll no result, statement was '".$sql."'" . ( $params ? 'params: ' .join(',', $params) : '' ) ); + Error( "SQL-ERR dbFetchAll no result, statement was '".$sql."'" . ( $params ? 'params: ' .join(',', $params) : '' ) ); return false; } From 26ac1fd69565f227887266f39950926ebbfa47fb Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 1 Feb 2018 11:32:13 -0500 Subject: [PATCH 03/19] Include soap version in list of onvif cameras --- web/skins/classic/views/onvifprobe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/views/onvifprobe.php b/web/skins/classic/views/onvifprobe.php index f2ca662cb..f9c766846 100644 --- a/web/skins/classic/views/onvifprobe.php +++ b/web/skins/classic/views/onvifprobe.php @@ -158,7 +158,7 @@ if( !isset($_REQUEST['step']) || ($_REQUEST['step'] == "1")) { */ // $sourceDesc = htmlspecialchars(serialize($camera['monitor'])); $sourceDesc = base64_encode(serialize($camera['monitor'])); - $sourceString = $camera['model'].' @ '.$host; + $sourceString = $camera['model'].' @ '.$host . ' using version ' . $camera['monitor']['SOAP'] ; $cameras[$sourceDesc] = $sourceString; } From 73edd3221a3fbb72faac4c3445e96c28efe48d1d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 1 Feb 2018 11:32:44 -0500 Subject: [PATCH 04/19] make DiskSpace in storage table be int instead of unsigned. Event deletions can make it go negative and then the delete fails. --- db/zm_create.sql.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index d084cda2a..79eca0056 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -841,7 +841,7 @@ CREATE TABLE `Storage` ( `Path` varchar(64) NOT NULL default '', `Name` varchar(64) NOT NULL default '', `Type` enum('local','s3fs') NOT NULL default 'local', - `DiskSpace` bigint unsigned default NULL, + `DiskSpace` bigint default NULL, `Scheme` enum('Deep','Medium','Shallow') NOT NULL default 'Medium', `ServerId` int(10) unsigned, PRIMARY KEY (`Id`) From 060acffb9d3476b1d927c25636bdfa390b96177c Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 1 Feb 2018 11:32:55 -0500 Subject: [PATCH 05/19] make DiskSpace in storage table be int instead of unsigned. Event deletions can make it go negative and then the delete fails. --- db/zm_update-1.31.31.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 db/zm_update-1.31.31.sql diff --git a/db/zm_update-1.31.31.sql b/db/zm_update-1.31.31.sql new file mode 100644 index 000000000..66e25f95c --- /dev/null +++ b/db/zm_update-1.31.31.sql @@ -0,0 +1 @@ +ALTER TABLE Storage MODIFY DiskSpace BIGINT default NULL; From 40379f7df6ccc453e0f78f95d4a613964c9a3d8f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 1 Feb 2018 11:33:56 -0500 Subject: [PATCH 06/19] bump version --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index e9c3366c8..e5f37b4d8 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.31.30 +1.31.31 From 929e49c3010e38d6b7296e311a8af122c5be05c4 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 10:27:30 -0500 Subject: [PATCH 07/19] early return if there is no rows returned. Improve debug when there is a row but the specified column isn't present --- web/includes/database.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/includes/database.php b/web/includes/database.php index dfe7f4817..250e5fce8 100644 --- a/web/includes/database.php +++ b/web/includes/database.php @@ -153,11 +153,15 @@ function dbFetchOne( $sql, $col=false, $params=NULL ) { Error( "SQL-ERR dbFetchOne no result, statement was '".$sql."'" . ( $params ? 'params: ' . join(',',$params) : '' ) ); return false; } + if ( ! $result->rowCount() ) { + # No rows is not an error + return false; + } if ( $result && $dbRow = $result->fetch( PDO::FETCH_ASSOC ) ) { if ( $col ) { if ( ! isset( $dbRow[$col] ) ) { - Warning( "$col does not exist in the returned row" ); + Warning( "$col does not exist in the returned row " . print_r($dbRow, true) ); } return $dbRow[$col]; } From 68521aa0d47be3fec9bba8f86abb316cb8815e42 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 10:27:50 -0500 Subject: [PATCH 08/19] 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 ) ) ) { From 868e17a414a186565f0d6e2729c18d3d00a139cf Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 10:31:55 -0500 Subject: [PATCH 09/19] Allow Method in Monitors to be NULL --- db/zm_create.sql.in | 2 +- db/zm_update-1.31.32.sql | 3 +++ src/zm_monitor.cpp | 4 ++-- version | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 db/zm_update-1.31.32.sql diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 79eca0056..f9bb3866d 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -562,7 +562,7 @@ CREATE TABLE `Monitors` ( `V4LMultiBuffer` tinyint(1) unsigned, `V4LCapturesPerFrame` tinyint(3) unsigned, `Protocol` varchar(16), - `Method` varchar(16) NOT NULL default '', + `Method` varchar(16) default '', `Host` varchar(64), `Port` varchar(8) NOT NULL default '', `SubPath` varchar(64) NOT NULL default '', diff --git a/db/zm_update-1.31.32.sql b/db/zm_update-1.31.32.sql new file mode 100644 index 000000000..781fce1fc --- /dev/null +++ b/db/zm_update-1.31.32.sql @@ -0,0 +1,3 @@ +ALTER TABLE Monitors MODIFY TotalEventDiskSpace BIGINT default NULL; +ALTER TABLE Monitors MODIFY Method VARCHAR(16) default NULL; + diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 9f0b05d31..87cda8c80 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1937,7 +1937,7 @@ int Monitor::LoadLocalMonitors( const char *device, Monitor **&monitors, Purpose } Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); col++; - const char *method = dbrow[col]; col++; + const char *method = dbrow[col] ? dbrow[col] : ""; col++; int width = atoi(dbrow[col]); col++; int height = atoi(dbrow[col]); col++; @@ -2438,7 +2438,7 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose const char *linked_monitors = dbrow[col] ? dbrow[col] : ""; col++; const char *path = dbrow[col]; col++; - const char *method = dbrow[col]; col++; + const char *method = dbrow[col] ? dbrow[col] : ""; col++; const char *options = dbrow[col] ? dbrow[col] : ""; col++; int width = atoi(dbrow[col]); col++; diff --git a/version b/version index e5f37b4d8..71736e954 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.31.31 +1.31.32 From 87ef17dddcf5c9a1c0b6d18d16d37d5748033ae5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 11:05:56 -0500 Subject: [PATCH 10/19] errors running a command should NOT exit! --- scripts/ZoneMinder/lib/ZoneMinder/General.pm | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/General.pm b/scripts/ZoneMinder/lib/ZoneMinder/General.pm index c362a81bf..f3bc54c5e 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/General.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/General.pm @@ -174,7 +174,6 @@ sub runCommand { if ( $status || logDebugging() ) { if ( $status ) { Error( "Unable to run \"$command\", output is \"$output\"\n" ); - exit( -1 ); } else { Debug( "Output: $output\n" ); } From 0287868f5e98f34814476e21fba75273df26986a Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 11:06:47 -0500 Subject: [PATCH 11/19] include the status when error runCommand --- scripts/ZoneMinder/lib/ZoneMinder/General.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/General.pm b/scripts/ZoneMinder/lib/ZoneMinder/General.pm index f3bc54c5e..692af30d4 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/General.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/General.pm @@ -173,7 +173,7 @@ sub runCommand { chomp( $output ); if ( $status || logDebugging() ) { if ( $status ) { - Error( "Unable to run \"$command\", output is \"$output\"\n" ); + Error( "Unable to run \"$command\", output is \"$output\", status is $status\n" ); } else { Debug( "Output: $output\n" ); } From 8e8b6bdc362bc275aaee27d4b3d83db34d890347 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 12:08:54 -0500 Subject: [PATCH 12/19] Select Events by StorageArea --- scripts/zmaudit.pl.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/zmaudit.pl.in b/scripts/zmaudit.pl.in index 519e80851..033f265c9 100644 --- a/scripts/zmaudit.pl.in +++ b/scripts/zmaudit.pl.in @@ -193,7 +193,7 @@ MAIN: while( $loop ) { or Fatal( "Can't prepare '$monitorSelectSql': ".$dbh->errstr() ); my $eventSelectSql = 'SELECT Id, (unix_timestamp() - unix_timestamp(StartTime)) AS Age - FROM Events WHERE MonitorId = ? ORDER BY Id'; + FROM Events WHERE MonitorId = ?'.(@Storage_Areas ? ' AND StorageId IN ('.join(',',map { '?'} @Storage_Areas).')' : '' ). ' ORDER BY Id'; my $eventSelectSth = $dbh->prepare_cached( $eventSelectSql ) or Fatal( "Can't prepare '$eventSelectSql': ".$dbh->errstr() ); @@ -204,7 +204,7 @@ MAIN: while( $loop ) { $Monitors{$$monitor{Id}} = $monitor; my $db_events = $db_monitors->{$monitor->{Id}} = {}; - my $res = $eventSelectSth->execute( $monitor->{Id} ) + my $res = $eventSelectSth->execute( $monitor->{Id}, map { $$_{Id} } @Storage_Areas ) or Fatal( "Can't execute: ".$eventSelectSth->errstr() ); while ( my $event = $eventSelectSth->fetchrow_hashref() ) { $db_events->{$event->{Id}} = $event->{Age}; From b0f755b5fc2ca1e78f1e93cfc2174cba2545bf76 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 12:14:01 -0500 Subject: [PATCH 13/19] put unarchive, archive, delete in a transaction for speed --- web/includes/actions.php | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/web/includes/actions.php b/web/includes/actions.php index 3c55af3db..837586274 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -67,13 +67,20 @@ function do_post_request($url, $data, $optional_headers = null) { function getAffectedIds( $name ) { $names = $name.'s'; $ids = array(); - if ( isset($_REQUEST[$names]) || isset($_REQUEST[$name]) ) { - if ( isset($_REQUEST[$names]) ) - $ids = validInt($_REQUEST[$names]); - else if ( isset($_REQUEST[$name]) ) - $ids[] = validInt($_REQUEST[$name]); - } - return( $ids ); + if ( isset($_REQUEST[$names]) ) { + if ( is_array($_REQUEST[$names]) ) { + $ids = $_REQUEST[$names]; + } else { + $ids = array($_REQUEST[$names]); + } + } else if ( isset($_REQUEST[$name]) ) { + if ( is_array($_REQUEST[$name]) ) { + $ids = $_REQUEST[$name]; + } else { + $ids = array($_REQUEST[$name]); + } + } + return $ids; } @@ -198,33 +205,39 @@ if ( canView( 'Events' ) ) { else { // Event scope actions, edit permissions required - if ( canEdit( 'Events' ) ) { - if ( $action == 'rename' && isset($_REQUEST['eventName']) && !empty($_REQUEST['eid']) ) { + if ( canEdit('Events') ) { + if ( ($action == 'rename') && isset($_REQUEST['eventName']) && !empty($_REQUEST['eid']) ) { dbQuery( 'UPDATE Events SET Name=? WHERE Id=?', array( $_REQUEST['eventName'], $_REQUEST['eid'] ) ); } else if ( $action == 'eventdetail' ) { if ( !empty($_REQUEST['eid']) ) { dbQuery( 'UPDATE Events SET Cause=?, Notes=? WHERE Id=?', array( $_REQUEST['newEvent']['Cause'], $_REQUEST['newEvent']['Notes'], $_REQUEST['eid'] ) ); } else { - foreach( getAffectedIds( 'markEid' ) as $markEid ) { + $dbConn->beginTransaction(); + foreach( getAffectedIds('markEid') as $markEid ) { dbQuery( 'UPDATE Events SET Cause=?, Notes=? WHERE Id=?', array( $_REQUEST['newEvent']['Cause'], $_REQUEST['newEvent']['Notes'], $markEid ) ); } + $dbConn->commit(); } $refreshParent = true; $closePopup = true; } elseif ( $action == 'archive' || $action == 'unarchive' ) { $archiveVal = ($action == 'archive')?1:0; if ( !empty($_REQUEST['eid']) ) { - dbQuery( 'UPDATE Events SET Archived=? WHERE Id=?', array( $archiveVal, $_REQUEST['eid']) ); + dbQuery('UPDATE Events SET Archived=? WHERE Id=?', array($archiveVal, $_REQUEST['eid'])); } else { + $dbConn->beginTransaction(); foreach( getAffectedIds( 'markEid' ) as $markEid ) { - dbQuery( 'UPDATE Events SET Archived=? WHERE Id=?', array( $archiveVal, $markEid ) ); + dbQuery('UPDATE Events SET Archived=? WHERE Id=?', array($archiveVal, $markEid)); } + $dbConn->commit(); $refreshParent = true; } } elseif ( $action == 'delete' ) { + $dbConn->beginTransaction(); foreach( getAffectedIds( 'markEid' ) as $markEid ) { deleteEvent( $markEid ); } + $dbConn->commit(); $refreshParent = true; } } // end if canEdit(Events) From e8ace6d4dd0816235c32c2eb8bf8500676e36490 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 12:47:51 -0500 Subject: [PATCH 14/19] include base version of jquery-ui-theme --- web/skins/classic/includes/functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 993441cdf..4ce09844e 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -81,11 +81,13 @@ echo output_link_if_exists( array( 'css/'.$css.'/views/'.$basename.'.css', '/js/dateTimePicker/jquery-ui-timepicker-addon.css', '/js/jquery-ui-structure.css', + '/css/base/jquery-ui-theme.css', '/css/'.$css.'/jquery-ui-theme.css', + '/js/chosen/chosen.min.css', ) ); ?> - + Date: Fri, 2 Feb 2018 12:48:22 -0500 Subject: [PATCH 15/19] fix Storage dropdown population and don't clear value on line type change --- web/skins/classic/views/js/filter.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/skins/classic/views/js/filter.js b/web/skins/classic/views/js/filter.js index c8e6749a4..4df73997e 100644 --- a/web/skins/classic/views/js/filter.js +++ b/web/skins/classic/views/js/filter.js @@ -61,7 +61,7 @@ function updateButtons( element ) { function checkValue ( element ) { let rows = $j(element).closest('tbody').children(); parseRows(rows); - clearValue(element); + //clearValue(element); } function clearValue( element ) { @@ -178,9 +178,15 @@ function parseRows (rows) { } else if (inputTds.eq(2).children().val() == 'StorageId') { //Choose by storagearea let storageSelect = $j('').attr('name', queryPrefix + rowNum + '][val]').attr('id', queryPrefix + rowNum + '][val]'); + for ( key in storageareas ) { +console.log(key + ' ' + storageareas[key]); + storageSelect.append(''); +} +/* for (let i=0; i < storageareas.length; i++) { storageSelect.append(''); } +*/ let storageVal = inputTds.eq(4).children().val(); inputTds.eq(4).html(storageSelect).children().val(storageVal).chosen({width: "101%"}); From dee843d7da66e759aaaa35107e47707a0956aab8 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 12:48:49 -0500 Subject: [PATCH 16/19] add All and remove default from Storage dropdown options --- web/skins/classic/views/filter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/skins/classic/views/filter.php b/web/skins/classic/views/filter.php index 9d4d6094e..79485c535 100644 --- a/web/skins/classic/views/filter.php +++ b/web/skins/classic/views/filter.php @@ -127,8 +127,8 @@ $archiveTypes = array( $focusWindow = true; -$storageareas = array(); -$storageareas[0] = 'Default ' . ZM_DIR_EVENTS; +$storageareas = array( '' => 'All' ); +//$storageareas[0] = 'Default ' . ZM_DIR_EVENTS; foreach ( dbFetchAll( 'SELECT Id,Name FROM Storage ORDER BY lower(Name) ASC' ) as $storage ) { $storageareas[$storage['Id']] = $storage['Name']; } From 515af57c56ac67e3c54db34ff43ab221a671e17a Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 13:24:01 -0500 Subject: [PATCH 17/19] Fix some styles on filter edit --- web/skins/classic/css/base/skin.css | 4 ++++ web/skins/classic/css/base/views/filter.css | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/web/skins/classic/css/base/skin.css b/web/skins/classic/css/base/skin.css index 9ea3e843a..e86264989 100644 --- a/web/skins/classic/css/base/skin.css +++ b/web/skins/classic/css/base/skin.css @@ -95,6 +95,7 @@ input,textarea,select,button,.btn-primary { font-weight: 400; font-size: 100%; color: #333333; + text-align: left; } /* input[type=text], input[type=password], input[type="url"], textarea, select { @@ -544,3 +545,6 @@ margin-left: 0; .nav-pills > li > a { border-radius: 0; } +.chosen-container { +text-align: left; +} diff --git a/web/skins/classic/css/base/views/filter.css b/web/skins/classic/css/base/views/filter.css index 839554c6e..638b85c9b 100644 --- a/web/skins/classic/css/base/views/filter.css +++ b/web/skins/classic/css/base/views/filter.css @@ -56,3 +56,9 @@ select { width: 300px; text-align: right; } +select#Id { +min-width: 400px; +} +.Name input { +min-width: 400px; +} From 93996402d9ebab15b597cb5d730f6af699746248 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 13:24:07 -0500 Subject: [PATCH 18/19] turn off debug --- web/includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index 49c3f7a73..582264e68 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -169,9 +169,9 @@ function generateAuthHash( $useRemoteAddr ) { } $_SESSION['AuthHash'] = $auth; $_SESSION['AuthHashGeneratedAt'] = $time; - Logger::Debug("Generated new auth $auth at " . $_SESSION['AuthHashGeneratedAt']. " using $authKey" ); - } else { - Logger::Debug( "Using cached auth " . $_SESSION['AuthHash'] ." beacuse " . $_SESSION['AuthHashGeneratedAt'] . ' < '. $time . ' - ' . ZM_AUTH_HASH_TTL . ' * 1800 = '.( $time - (ZM_AUTH_HASH_TTL * 1800) )); + #Logger::Debug("Generated new auth $auth at " . $_SESSION['AuthHashGeneratedAt']. " using $authKey" ); + #} else { + #Logger::Debug( "Using cached auth " . $_SESSION['AuthHash'] ." beacuse " . $_SESSION['AuthHashGeneratedAt'] . ' < '. $time . ' - ' . ZM_AUTH_HASH_TTL . ' * 1800 = '.( $time - (ZM_AUTH_HASH_TTL * 1800) )); } # end if AuthHash is not cached return $_SESSION['AuthHash']; } else { From 058b2be9a7b858ec29c2187c05c75a3a3c2cc068 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 2 Feb 2018 13:26:44 -0500 Subject: [PATCH 19/19] fix chosen sprites --- web/skins/classic/includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 4ce09844e..c788bb039 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -83,11 +83,11 @@ echo output_link_if_exists( array( '/js/jquery-ui-structure.css', '/css/base/jquery-ui-theme.css', '/css/'.$css.'/jquery-ui-theme.css', - '/js/chosen/chosen.min.css', ) ); ?> - + +