Revision: 2548
          https://sourceforge.net/p/mrbs/code/2548/
Author:   cimorrison
Date:     2012-11-02 11:32:52 +0000 (Fri, 02 Nov 2012)
Log Message:
-----------
Fixed bug where <span>s used for sorting the HTML table were appearing in the 
CSV and iCalendar reports.

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

Modified: mrbs/trunk/web/report.php
===================================================================
--- mrbs/trunk/web/report.php   2012-10-31 12:45:36 UTC (rev 2547)
+++ mrbs/trunk/web/report.php   2012-11-02 11:32:52 UTC (rev 2548)
@@ -368,6 +368,22 @@
 }
 
 
+// Wraps $string in a span with a data-stype value of $stype - but only for 
HTML output
+function stype_wrap($string, $stype)
+{
+  global $output_format;
+  
+  if ($output_format == OUTPUT_HTML)
+  {
+    return '<span class="normal" data-stype="title-numeric">' . $string . 
'</span>';
+  }
+  else
+  {
+    return $string;
+  }
+}
+
+
 // Output the first row (header row) for CSV reports
 function report_header()
 {
@@ -400,11 +416,11 @@
         $values[] = get_vocab("room");
         break;
       case 'start_time':
-        $values[] = '<span class="normal" data-stype="title-numeric">' . 
get_vocab("start_date") . '</span>';
+        $values[] = stype_wrap(get_vocab("start_date"), 'title-numeric');
         break;
       case 'end_time':
-        e 'end_time':e_wrap(get_vocab("start_date"), 
'title-numeric');t_vocab("start_date") . 
'</span>';rI�T4+�t���t��u��T4+���T4+�
U4+��V4+�t����(V4+�i���h��k��T4+6
 
��!�!�t���t��x�V4+�j�����T4+���T4+�t��`��T4+�t����jV4+u��T4+�jV4+؄jV4+��jV4+���T4+x�V4+�j���i��k��T4+�!�!�t���t��H^�U4+�k�����T4+���T4+�t��`��T4+�t���t���t��8�
U4+�p��t��u��T4+���T4+�k���j��k��T4+GHIJKMNOP�t���t��H�U4+`m�����T4+���T4+�t��0�jV4+u��T4+�V4+�I�U4+�jV4+؄jV4+��jV4+���T4+H�U4+`m���k��k��T4+8�U4+`m���k��k��T4+(�U4+`m��l��k��T4+�U4+`m��0l��k��T4+
    
��jV4+u��T4+��jV4+�f�����U4+e��T4+؄jV4+�l��y��U4+e��T4+�jV4+m��Z��U4+e��T4+�D�U4+�V4+�I�U4+�jV4+ؤV4+؄jV4+��jV4+���T4+8�
U4+
fU4+�t��pۙU4+�n���m��k��T4+5678:<=>?@BD�t���t���
cU4+�t��u��T4+�
U4+0m��
fU4+e��T4+�
U4+�_@f�S Q��l���#2U4+�t���
cU4+�o���n��k��T4+u]��      
4Q��U^Qʉ��u������*ēv�t���t��H^/U4+�kU4+0v�����V4+���V4+��hU4+�t���u���t��q���V4+u��T4+ؤV4+pw�����V4+@v���q�������������V4+�t��$values[]
 = '<span class="normal" data-stype="title-numeric">' . get_vocab("end_date") . 
'</span>';
-        $values[] = '<span class="normal" data-stype="title-numeric">' . 
get_vocab("duration") . '</span>';
+        $values[] = stype_wrap(get_vocab("end_date"), 'title-numeric');
+        $values[] = stype_wrap(get_vocab("duration"), 'title-numeric');
         break;
       case 'description':
         $values[] = get_vocab("fulldescription_short");
@@ -428,7 +444,7 @@
         }
         break;
       case 'last_updated':
-        $values[] = '<span class="normal" data-stype="title-numeric">' . 
get_vocab("lastupdate") . '</span>';
+        $values[] = stype_wrap(get_vocab("lastupdate"), 'title-numeric');
         break;
       default:
         // the custom fields
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to