Revision: 2328
http://mrbs.svn.sourceforge.net/mrbs/?rev=2328&view=rev
Author: cimorrison
Date: 2012-07-11 16:42:08 +0000 (Wed, 11 Jul 2012)
Log Message:
-----------
Restructured code to make it easier to add other output formats
Modified Paths:
--------------
mrbs/trunk/web/report.php
Modified: mrbs/trunk/web/report.php
===================================================================
--- mrbs/trunk/web/report.php 2012-07-11 16:14:02 UTC (rev 2327)
+++ mrbs/trunk/web/report.php 2012-07-11 16:42:08 UTC (rev 2328)
@@ -503,9 +503,9 @@
$row['enable_periods']; ////////////////////////
// Use brief description, created by or type as the name:
$name = get_sumby_name_from_row($row);
- // Area and room separated by break (if not CSV):
+ // Area and room separated by break (if HTML):
$room = escape($row['area_name']);
- $room .= ($output_format == OUTPUT_CSV) ? '/' : "<br>";
+ $room .= ($output_format == OUTPUT_HTML) ? "<br>" : '/';
$room .= escape($row['room_name']);
// Accumulate the number of bookings for this room and name:
increment_count($count, $room, $name, 1);
@@ -534,13 +534,13 @@
{
global $output_format;
- if ($output_format == OUTPUT_CSV)
+ if ($output_format == OUTPUT_HTML)
{
- return $str;
+ return "($str)";
}
else
{
- return "($str)";
+ return $str;
}
}
@@ -635,8 +635,8 @@
}
else
{
- $cells[] = ($output_format == OUTPUT_CSV) ? '' : " ";
- $cells[] = ($output_format == OUTPUT_CSV) ? '' : " ";
+ $cells[] = ($output_format == OUTPUT_HTML) ? " " : '';
+ $cells[] = ($output_format == OUTPUT_HTML) ? " " : '';
}
}
// Add the total column(s) onto the end
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits