Revision: 1468
http://mrbs.svn.sourceforge.net/mrbs/?rev=1468&view=rev
Author: cimorrison
Date: 2010-09-23 10:38:25 +0000 (Thu, 23 Sep 2010)
Log Message:
-----------
Merged in latest changes from the trunk
Modified Paths:
--------------
mrbs/branches/provisional_bookings_new_style/INSTALL
mrbs/branches/provisional_bookings_new_style/web/day.php
mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php
mrbs/branches/provisional_bookings_new_style/web/functions.inc
mrbs/branches/provisional_bookings_new_style/web/lang.en
mrbs/branches/provisional_bookings_new_style/web/month.php
mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
mrbs/branches/provisional_bookings_new_style/web/systemdefaults.inc.php
mrbs/branches/provisional_bookings_new_style/web/week.php
Property Changed:
----------------
mrbs/branches/provisional_bookings_new_style/
mrbs/branches/provisional_bookings_new_style/web/upgrade/5/pgsql.sql
Property changes on: mrbs/branches/provisional_bookings_new_style
___________________________________________________________________
Modified: svn:mergeinfo
- /mrbs/branches/custom_entry_fields:1374-1396
/mrbs/branches/datepicker:1409-1416
/mrbs/branches/improve_css_2008_06:804-872
/mrbs/branches/provisional_bookings:1242-1280
/mrbs/trunk:1407-1458
+ /mrbs/branches/custom_entry_fields:1374-1396
/mrbs/branches/datepicker:1409-1416
/mrbs/branches/improve_css_2008_06:804-872
/mrbs/branches/provisional_bookings:1242-1280
/mrbs/trunk:1407-1467
Modified: mrbs/branches/provisional_bookings_new_style/INSTALL
===================================================================
--- mrbs/branches/provisional_bookings_new_style/INSTALL 2010-09-23
10:33:22 UTC (rev 1467)
+++ mrbs/branches/provisional_bookings_new_style/INSTALL 2010-09-23
10:38:25 UTC (rev 1468)
@@ -332,7 +332,29 @@
web directory. We recommend you backup your database before running
this script if you are at all worried.
+
+PERIODS
+---------------------------------------------------------------------------
+When using periods, MRBS stores bookings internally as one minute slots
+starting at 1200. If once you have had your system up and running for
+a while find that you need to add a new period then you will need to
+adjust the times of your existing bookings unless your new period is at
+the end of the day.
+The simplest example is when you want to add a new period at the start of
+the day. In this case you will need to run some SQL using phpMyAdmin or
+a similar program to move all bookings one minute later. In this example
+the SQL required would be
+
+UPDATE mrbs_entry SET start_time=start_time+60, end_time=end_time+60;
+UPDATE mrbs_repeat SET start_time=start_time+60, end_time=end_time+60,
+end_date=end_date+60;
+
+having changed "mrbs_" to your table prefix if necessary.
+
+Before running this SQL you should of course backup your database.
+
+
SECURITY NOTES!
---------------------------------------------------------------------------
You can configure your web server so that users can not obtain the ".inc"
Modified: mrbs/branches/provisional_bookings_new_style/web/day.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/day.php 2010-09-23
10:33:22 UTC (rev 1467)
+++ mrbs/branches/provisional_bookings_new_style/web/day.php 2010-09-23
10:38:25 UTC (rev 1468)
@@ -221,10 +221,18 @@
}
else
{
- // Show current date
- echo "<h2 id=\"dwm\">" . utf8_strftime("%A %d %B %Y", $am7) . "</h2>\n";
+ // Show current date and timezone
+ echo "<div id=\"dwm\">\n";
+ echo "<h2>" . utf8_strftime("%A %d %B %Y", $am7) . "</h2>\n";
+ if ($display_timezone)
+ {
+ echo "<div class=\"timezone\">";
+ echo get_vocab("timezone") . ": " . date('T', $am7) . " (UTC" . date('O',
$am7) . ")";
+ echo "</div>\n";
+ }
+ echo "</div>\n";
+
// Generate Go to day before and after links
-
$before_after_links_html = "
<div class=\"screenonly\">
<div class=\"date_nav\">
Modified:
mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php
2010-09-23 10:33:22 UTC (rev 1467)
+++ mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php
2010-09-23 10:38:25 UTC (rev 1468)
@@ -327,7 +327,13 @@
{
$endtime += $resolution;
}
-
+
+ // Now adjust the duration in line with the adjustments to start and end time
+ // so that the email notifications report the adjusted duration
+ // (We do this before we adjust for DST so that the user sees what they
expect to see)
+ $duration = $endtime - $starttime;
+ $enable_periods ? toPeriodString($period, $duration, $dur_units, FALSE) :
toTimeString($duration, $dur_units, FALSE);
+
// Adjust the endtime for DST
$endtime += cross_dst( $starttime, $endtime );
}
Modified: mrbs/branches/provisional_bookings_new_style/web/functions.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/functions.inc
2010-09-23 10:33:22 UTC (rev 1467)
+++ mrbs/branches/provisional_bookings_new_style/web/functions.inc
2010-09-23 10:38:25 UTC (rev 1468)
@@ -125,7 +125,8 @@
header("Expires: ".rfc1123_date(time()+$seconds));
}
-
+// Converts a duration of $dur seconds into a duration of
+// $dur $units
function toTimeString(&$dur, &$units, $translate=TRUE)
{
if (abs($dur) >= 60)
@@ -173,6 +174,13 @@
{
$units = "seconds";
}
+
+ // Limit any floating point values to three decimal places
+ if (is_float($dur))
+ {
+ $dur = sprintf('%.3f', $dur);
+ }
+
// Translate into local language if required
if ($translate)
{
Modified: mrbs/branches/provisional_bookings_new_style/web/lang.en
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/lang.en 2010-09-23
10:33:22 UTC (rev 1467)
+++ mrbs/branches/provisional_bookings_new_style/web/lang.en 2010-09-23
10:38:25 UTC (rev 1468)
@@ -34,6 +34,7 @@
$vocab["goto"] = "goto";
$vocab["highlight_line"] = "Highlight this line";
$vocab["click_to_reserve"] = "Click on the cell to make a reservation.";
+$vocab["timezone"] = "Timezone";
// Used in trailer.inc
$vocab["viewday"] = "View Day";
Modified: mrbs/branches/provisional_bookings_new_style/web/month.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/month.php 2010-09-23
10:33:22 UTC (rev 1467)
+++ mrbs/branches/provisional_bookings_new_style/web/month.php 2010-09-23
10:38:25 UTC (rev 1468)
@@ -166,8 +166,10 @@
}
// Show Month, Year, Area, Room header:
-echo "<h2 id=\"dwm\">" . utf8_strftime("%B %Y", $month_start)
+echo "<div id=\"dwm\">\n";
+echo "<h2>" . utf8_strftime("%B %Y", $month_start)
. " - $this_area_name - $this_room_name</h2>\n";
+echo "</div>\n";
// Show Go to month before and after links
//y? are year and month and day of the previous month.
Modified: mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
2010-09-23 10:33:22 UTC (rev 1467)
+++ mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
2010-09-23 10:38:25 UTC (rev 1468)
@@ -166,7 +166,10 @@
#dwm_header ul {list-style-type: none; padding-left: 0; margin-left: 0;
margin-top: 0}
#dwm_header li {padding-left: 0; margin-left: 0}
-h2#dwm {text-align: center}
+div#dwm {margin-bottom: 0.5em}
+#dwm {text-align: center}
+#dwm h2 {margin-bottom: 0}
+#dwm div.timezone {opacity: 0.8}
div.date_nav {float: left; width: 100%; margin-top: 0.5em; margin-bottom:
0.5em; font-weight: bold}
div.date_before {float: left; width: 33%; text-align: left}
@@ -666,7 +669,7 @@
#banner a:link {color: <?php echo $anchor_link_color_banner ?>;
text-decoration: none; font-weight: normal}
#banner a:visited {color: <?php echo $anchor_visited_color_banner ?>;
text-decoration: none; font-weight: normal}
#banner a:hover {color: <?php echo $anchor_hover_color_banner ?>;
text-decoration:underline; font-weight: normal}
-#banner input.date {width: 6em}
+#banner input.date {width: 6.5em}
table#colour_key {clear: both; border-spacing: 0; border-collapse: collapse}
#colour_key td {width: 7.0em; padding: 2px; font-weight: bold;
Modified:
mrbs/branches/provisional_bookings_new_style/web/systemdefaults.inc.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/systemdefaults.inc.php
2010-09-23 10:33:22 UTC (rev 1467)
+++ mrbs/branches/provisional_bookings_new_style/web/systemdefaults.inc.php
2010-09-23 10:38:25 UTC (rev 1468)
@@ -217,7 +217,10 @@
$periods[] = "Period 2";
// NOTE: The maximum number of periods is 60. Do not define more than this.
+// NOTE: See INSTALL for information on how to add or remove periods in an
+// existing database.
+
/******************
* Booking policies
******************/
@@ -298,6 +301,9 @@
// in 24 hour format
$twentyfourhour_format = 1;
+// Whether or not to display the timezone
+$display_timezone = FALSE;
+
// Results per page for searching:
$search["count"] = 20;
Property changes on:
mrbs/branches/provisional_bookings_new_style/web/upgrade/5/pgsql.sql
___________________________________________________________________
Modified: svn:mergeinfo
- /mrbs/branches/custom_entry_fields/web/upgrade/5/pgsql.sql:1374-1396
/mrbs/branches/datepicker/web/upgrade/5/pgsql.sql:1409-1416
/mrbs/branches/provisional_bookings/web/upgrade/5/pgsql.sql:1242-1280
/mrbs/trunk/web/upgrade/5/pgsql.sql:1407-1458
+ /mrbs/branches/custom_entry_fields/web/upgrade/5/pgsql.sql:1374-1396
/mrbs/branches/datepicker/web/upgrade/5/pgsql.sql:1409-1416
/mrbs/branches/provisional_bookings/web/upgrade/5/pgsql.sql:1242-1280
/mrbs/trunk/web/upgrade/5/pgsql.sql:1407-1467
Modified: mrbs/branches/provisional_bookings_new_style/web/week.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/week.php 2010-09-23
10:33:22 UTC (rev 1467)
+++ mrbs/branches/provisional_bookings_new_style/web/week.php 2010-09-23
10:38:25 UTC (rev 1468)
@@ -159,7 +159,9 @@
}
// Show area and room:
-echo "<h2 id=\"dwm\">$this_area_name - $this_room_name</h2>\n";
+echo "<div id=\"dwm\">\n";
+echo "<h2>$this_area_name - $this_room_name</h2>\n";
+echo "</div>\n";
//y? are year, month and day of the previous week.
//t? are year, month and day of the next week.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits