Revision: 2144
          http://mrbs.svn.sourceforge.net/mrbs/?rev=2144&view=rev
Author:   cimorrison
Date:     2011-10-24 08:26:46 +0000 (Mon, 24 Oct 2011)
Log Message:
-----------
Fixed bug in CSV report output:  a <span> was appearing in the duration field.

Modified Paths:
--------------
    mrbs/trunk/web/report.php

Modified: mrbs/trunk/web/report.php
===================================================================
--- mrbs/trunk/web/report.php   2011-10-24 07:09:40 UTC (rev 2143)
+++ mrbs/trunk/web/report.php   2011-10-24 08:26:46 UTC (rev 2144)
@@ -259,8 +259,18 @@
   $duration_seconds = $row['end_time'] - $row['start_time'];
   $duration_seconds -= cross_dst($row['start_time'], $row['end_time']);
   $d = get_duration($row['start_time'], $row['end_time']);
-  $values[] = "<span title=\"$duration_seconds\"></span>" .
-              escape($d['duration'] . ' ' . $d['dur_units']);
+  $d_string = $d['duration'] . ' ' . $d['dur_units'];
+  if ($output_as_csv)
+  {
+    $values[] = escape($d_string);
+  }
+  else
+  {
+    // Include the duration in a seconds as a title in an empty span so
+    // that the column can be sorted and filtered properly
+    $values[] = "<span title=\"$duration_seconds\"></span>" . 
escape($d_string);
+  }
+  
 
   // Description:
   $values[] = escape($row['description']);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to