From: Davide Franco Date: Thu, 16 Dec 2010 11:11:36 +0000 (+0100) Subject: bacula-web: Fixed typo for date function in bweb.inc.php and jobs.php X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9ead488822c1346736d7d9ef20a19676b50a6768;p=bacula%2Fbacula bacula-web: Fixed typo for date function in bweb.inc.php and jobs.php - Fixed wrong argument in date function for minute (H:m:s instead of H:i:s) --- diff --git a/gui/bacula-web/bweb.inc.php b/gui/bacula-web/bweb.inc.php index 7aef804d30..d0211024b2 100644 --- a/gui/bacula-web/bweb.inc.php +++ b/gui/bacula-web/bweb.inc.php @@ -359,8 +359,8 @@ class Bweb extends DB { $end_date = mktime(); $start_date = $end_date - $delay; - $start_date = date( "Y-m-d H:m:s", $start_date ); - $end_date = date( "Y-m-d H:m:s", $end_date ); + $start_date = date( "Y-m-d H:i:s", $start_date ); + $end_date = date( "Y-m-d H:i:s", $end_date ); switch( $this->driver ) { @@ -389,8 +389,8 @@ class Bweb extends DB { $end_date = mktime(); $start_date = $end_date - $delay; - $start_date = date( "Y-m-d H:m:s", $start_date ); - $end_date = date( "Y-m-d H:m:s", $end_date ); + $start_date = date( "Y-m-d H:i:s", $start_date ); + $end_date = date( "Y-m-d H:i:s", $end_date ); //echo "start date: $start_date
"; //echo "end date: $end_date
"; @@ -459,8 +459,8 @@ class Bweb extends DB { $end_date = mktime(); $start_date = $end_date - $delay; - $start_date = date( "Y-m-d H:m:s", $start_date ); - $end_date = date( "Y-m-d H:m:s", $end_date ); + $start_date = date( "Y-m-d H:i:s", $start_date ); + $end_date = date( "Y-m-d H:i:s", $end_date ); switch( $this->driver ) { @@ -504,8 +504,8 @@ class Bweb extends DB { $end_date = mktime(); $start_date = $end_date - $delay; - $start_date = date( "Y-m-d H:m:s", $start_date ); - $end_date = date( "Y-m-d H:m:s", $end_date ); + $start_date = date( "Y-m-d H:i:s", $start_date ); + $end_date = date( "Y-m-d H:i:s", $end_date ); // Job status switch( $type ) @@ -596,8 +596,8 @@ class Bweb extends DB { $end_date = mktime(); $start_date = $end_date - $delay; - $start_date = date( "Y-m-d H:m:s", $start_date ); - $end_date = date( "Y-m-d H:m:s", $end_date ); + $start_date = date( "Y-m-d H:i:s", $start_date ); + $end_date = date( "Y-m-d H:i:s", $end_date ); if( $delay != ALL ) { $query .= "WHERE EndTime BETWEEN '$start_date' AND '$end_date'"; diff --git a/gui/bacula-web/jobs.php b/gui/bacula-web/jobs.php index 2f28c20f20..1149c9e9f2 100644 --- a/gui/bacula-web/jobs.php +++ b/gui/bacula-web/jobs.php @@ -66,8 +66,8 @@ $end_date = mktime(); $start_date = $end_date - LAST_DAY; - $start_date = date( "Y-m-d H:m:s", $start_date ); - $end_date = date( "Y-m-d H:m:s", $end_date ); + $start_date = date( "Y-m-d H:i:s", $start_date ); + $end_date = date( "Y-m-d H:i:s", $end_date ); switch( $dbSql->driver ) { @@ -89,6 +89,7 @@ $query .= "ORDER BY Job.EndTime DESC"; break; } + $jobsresult = $dbSql->db_link->query( $query ); if( PEAR::isError( $jobsresult ) ) {