You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2014/09/24 21:52:45 UTC

svn commit: r1627402 - /vcl/trunk/web/.ht-inc/statistics.php

Author: jfthomps
Date: Wed Sep 24 19:52:45 2014
New Revision: 1627402

URL: http://svn.apache.org/r1627402
Log:
statistics.php: minor change - moved dividing time by 3600 to when $totalhours is displayed rather than when values are added to it to give a slight performance bump

Modified:
    vcl/trunk/web/.ht-inc/statistics.php

Modified: vcl/trunk/web/.ht-inc/statistics.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/statistics.php?rev=1627402&r1=1627401&r2=1627402&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/statistics.php (original)
+++ vcl/trunk/web/.ht-inc/statistics.php Wed Sep 24 19:52:45 2014
@@ -204,7 +204,7 @@ function viewStatistics() {
 	$tmp = mktime(0, 0, 0, $month2, $day2, $year2);
 	print strftime('%x', $tmp);
 	print ":</H3>\n";
-	$reloadid = getUserlistID('vclreload@local');
+	$reloadid = getUserlistID('vclreload@Local');
 	if($mode2 == 'default') {
 		$query = "SELECT l.userid, "
 		       .        "u.affiliationid, "
@@ -386,7 +386,7 @@ function viewStatistics() {
 			$imagefails[$row["prettyname"]] += 1;
 
 		# total hours
-		$totalhours += ($length / 3600);
+		$totalhours += $length;
 
 		# osusers
 		if(! array_key_exists($row["OS"], $osusers))
@@ -401,7 +401,7 @@ function viewStatistics() {
 	print "  </TR>\n";
 	print "  <TR>\n";
 	print _("    <TH align=right>Total Hours Used:</TH>\n");
-	print "    <TD>" . (int)$totalhours . "</TD>\n";
+	print "    <TD>" . (int)($totalhours / 3600) . "</TD>\n";
 	print "  </TR>\n";
 	print "  <TR>\n";
 	print _("    <TH align=right>\"Now\" Reservations:</TH>\n");