Revision: 1430
http://mrbs.svn.sourceforge.net/mrbs/?rev=1430&view=rev
Author: cimorrison
Date: 2010-09-01 08:38:11 +0000 (Wed, 01 Sep 2010)
Log Message:
-----------
Renamed provisional bookings to avoid confusion with the new style provisional
bookings that will appear soon. (Old style provisional bookings are now
bookings requiring approval).
Modified Paths:
--------------
mrbs/branches/provisional_bookings_new_style/tables.my.sql
mrbs/branches/provisional_bookings_new_style/tables.pg.pre73.sql
mrbs/branches/provisional_bookings_new_style/tables.pg.sql
mrbs/branches/provisional_bookings_new_style/web/Themes/classic126/styling.inc
mrbs/branches/provisional_bookings_new_style/web/Themes/default/header.inc
mrbs/branches/provisional_bookings_new_style/web/Themes/default/styling.inc
mrbs/branches/provisional_bookings_new_style/web/confirm_entry_handler.php
mrbs/branches/provisional_bookings_new_style/web/dbsys.inc
mrbs/branches/provisional_bookings_new_style/web/del_entry.php
mrbs/branches/provisional_bookings_new_style/web/edit_area_room.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/functions_mail.inc
mrbs/branches/provisional_bookings_new_style/web/internalconfig.inc.php
mrbs/branches/provisional_bookings_new_style/web/lang.en
mrbs/branches/provisional_bookings_new_style/web/lang.ja
mrbs/branches/provisional_bookings_new_style/web/language.inc
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/mrbs_auth.inc
mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc
mrbs/branches/provisional_bookings_new_style/web/pending.php
mrbs/branches/provisional_bookings_new_style/web/systemdefaults.inc.php
mrbs/branches/provisional_bookings_new_style/web/view_entry.php
Added Paths:
-----------
mrbs/branches/provisional_bookings_new_style/web/upgrade/17/
mrbs/branches/provisional_bookings_new_style/web/upgrade/17/mysql.sql
mrbs/branches/provisional_bookings_new_style/web/upgrade/17/pgsql.sql
Modified: mrbs/branches/provisional_bookings_new_style/tables.my.sql
===================================================================
--- mrbs/branches/provisional_bookings_new_style/tables.my.sql 2010-08-31
15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/tables.my.sql 2010-09-01
08:38:11 UTC (rev 1430)
@@ -37,7 +37,7 @@
max_book_ahead_enabled tinyint(1),
max_book_ahead_secs int,
custom_html text,
- provisional_enabled tinyint(1),
+ approval_enabled tinyint(1),
reminders_enabled tinyint(1),
PRIMARY KEY (id)
@@ -128,6 +128,6 @@
);
INSERT INTO mrbs_variables (variable_name, variable_content)
- VALUES ( 'db_version', '16');
+ VALUES ( 'db_version', '17');
INSERT INTO mrbs_variables (variable_name, variable_content)
VALUES ( 'local_db_version', '1');
Modified: mrbs/branches/provisional_bookings_new_style/tables.pg.pre73.sql
===================================================================
--- mrbs/branches/provisional_bookings_new_style/tables.pg.pre73.sql
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/tables.pg.pre73.sql
2010-09-01 08:38:11 UTC (rev 1430)
@@ -40,7 +40,7 @@
max_book_ahead_enabled smallint,
max_book_ahead_secs int,
custom_html text,
- provisional_enabled smallint,
+ approval_enabled smallint,
reminders_enabled smallint
);
@@ -119,6 +119,6 @@
);
INSERT INTO mrbs_variables (variable_name, variable_content)
- VALUES ('db_version', '16');
+ VALUES ('db_version', '17');
INSERT INTO mrbs_variables (variable_name, variable_content)
VALUES ('local_db_version', '1');
Modified: mrbs/branches/provisional_bookings_new_style/tables.pg.sql
===================================================================
--- mrbs/branches/provisional_bookings_new_style/tables.pg.sql 2010-08-31
15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/tables.pg.sql 2010-09-01
08:38:11 UTC (rev 1430)
@@ -53,7 +53,7 @@
max_book_ahead_enabled smallint,
max_book_ahead_secs int,
custom_html text,
- provisional_enabled smallint,
+ approval_enabled smallint,
reminders_enabled smallint
);
@@ -132,6 +132,6 @@
);
INSERT INTO mrbs_variables (variable_name, variable_content)
- VALUES ('db_version', '16');
+ VALUES ('db_version', '17');
INSERT INTO mrbs_variables (variable_name, variable_content)
VALUES ('local_db_version', '1');
Modified:
mrbs/branches/provisional_bookings_new_style/web/Themes/classic126/styling.inc
===================================================================
---
mrbs/branches/provisional_bookings_new_style/web/Themes/classic126/styling.inc
2010-08-31 15:23:41 UTC (rev 1429)
+++
mrbs/branches/provisional_bookings_new_style/web/Themes/classic126/styling.inc
2010-09-01 08:38:11 UTC (rev 1430)
@@ -88,7 +88,7 @@
'I' => "#DDFFDD",
'J' => "#CCCCCC");
-// colours used for pending.php and provisional bookings
+// colours used for pending.php and bookings awaiting approval
$outstanding_color = "#FF4444"; // font colour for the outstanding
reservations message in the header
$pending_header_back_color = $header_back_color; // background colour for
series headers
$series_entry_back_color = "#FFFBC2"; // background colour for entries in a
series
Modified:
mrbs/branches/provisional_bookings_new_style/web/Themes/default/header.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/Themes/default/header.inc
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/Themes/default/header.inc
2010-09-01 08:38:11 UTC (rev 1430)
@@ -413,34 +413,34 @@
</div>
</form>
<?php
- // Provide a link to the list of outstanding provisional bookings
- // (if there are any areas where we are using provisional bookings)
+ // Provide a link to the list of bookings awaiting approval
+ // (if there are any areas where we require bookings to be approved)
$user = getUserName();
- // Build the SQL condition for evaluating whether provisional booking
is
+ // Build the SQL condition for evaluating whether booking approval is
// enabled for an area. It is enabled if the field is set, or if
it's
// not set but the default area setting is for it to be enabled.
- $sql_provisional_enabled = "(provisional_enabled IS NOT NULL AND
provisional_enabled > 0)";
- if ($area_defaults['provisional_enabled'])
+ $sql_approval_enabled = "(approval_enabled IS NOT NULL AND
approval_enabled > 0)";
+ if ($area_defaults['approval_enabled'])
{
- $sql_provisional_enabled = "(" . $sql_provisional_enabled . " OR
(provisional_enabled IS NULL))";
+ $sql_approval_enabled = "(" . $sql_approval_enabled . " OR
(approval_enabled IS NULL))";
}
$sql = "SELECT COUNT(*)
FROM $tbl_area
- WHERE $sql_provisional_enabled
+ WHERE $sql_approval_enabled
LIMIT 1";
- $provisional_somewhere = (sql_query1($sql) > 0);
- if ($provisional_somewhere && (authGetUserLevel($user) >= 1))
+ $approval_somewhere = (sql_query1($sql) > 0);
+ if ($approval_somewhere && (authGetUserLevel($user) >= 1))
{
$is_admin = (authGetUserLevel($user) >= 2);
- // Find out how many provisional bookings there are
- // (but only for areas where provisional bookings are enabled)
+ // Find out how many bookings are awaiting approval
+ // (but only for areas where approval is required)
$sql = "SELECT COUNT(*)
FROM $tbl_entry E, $tbl_room R, $tbl_area A
WHERE status&" . STATUS_AWAITING_APPROVAL . ">0
AND E.room_id = R.id
AND R.area_id = A.id
- AND $sql_provisional_enabled";
+ AND $sql_approval_enabled";
if (!$is_admin)
{
// Ordinary users can only see their own
Modified:
mrbs/branches/provisional_bookings_new_style/web/Themes/default/styling.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/Themes/default/styling.inc
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/Themes/default/styling.inc
2010-09-01 08:38:11 UTC (rev 1430)
@@ -87,7 +87,7 @@
'I' => "#99cc66",
'J' => "#e6ffe6");
-// colours used for pending.php and provisional bookings
+// colours used for pending.php and bookings awaiting approval
$outstanding_color = "#FFF36C"; // font colour for the outstanding
reservations message in the header
$pending_header_back_color = $header_back_color;; // background colour for
series headers
$series_entry_back_color = "#FFFCDA"; // background colour for entries in a
series
Modified:
mrbs/branches/provisional_bookings_new_style/web/confirm_entry_handler.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/confirm_entry_handler.php
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/confirm_entry_handler.php
2010-09-01 08:38:11 UTC (rev 1430)
@@ -1,7 +1,7 @@
<?php
// $Id$
-// Handles actions on provisional bookings
+// Handles actions on bookings awaiting approval
require_once "defaultincludes.inc";
require_once "mrbs_sql.inc";
Modified: mrbs/branches/provisional_bookings_new_style/web/dbsys.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/dbsys.inc 2010-08-31
15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/dbsys.inc 2010-09-01
08:38:11 UTC (rev 1430)
@@ -15,7 +15,7 @@
$tbl_variables = $db_tbl_prefix . "variables";
-$db_schema_version = 16;
+$db_schema_version = 17;
$local_db_schema_version = 1;
Modified: mrbs/branches/provisional_bookings_new_style/web/del_entry.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/del_entry.php
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/del_entry.php
2010-09-01 08:38:11 UTC (rev 1430)
@@ -63,7 +63,7 @@
// Get the settings for this area (they will be needed for policy checking)
get_area_settings($area);
- $notify_by_email = $mail_settings['admin_on_delete'] ||
$mail_settings['book_admin_on_provisional'];
+ $notify_by_email = $mail_settings['admin_on_delete'] ||
$mail_settings['book_admin_on_approval'];
if ($notify_by_email)
{
Modified: mrbs/branches/provisional_bookings_new_style/web/edit_area_room.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/edit_area_room.php
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/edit_area_room.php
2010-09-01 08:38:11 UTC (rev 1430)
@@ -76,7 +76,7 @@
$area_private_default = get_form_var('area_private_default', 'int');
$area_private_mandatory = get_form_var('area_private_mandatory', 'string');
$area_private_override = get_form_var('area_private_override', 'string');
-$area_provisional_enabled = get_form_var('area_provisional_enabled', 'string');
+$area_approval_enabled = get_form_var('area_approval_enabled', 'string');
$area_reminders_enabled = get_form_var('area_reminders_enabled', 'string');
$custom_html = get_form_var('custom_html', 'string'); // Used for both area
and room, but you only ever have one or the other
$change_done = get_form_var('change_done', 'string');
@@ -310,7 +310,7 @@
$area_max_ba_enabled = (!empty($area_max_ba_enabled)) ? 1 : 0;
$area_private_enabled = (!empty($area_private_enabled)) ? 1 : 0;
$area_private_mandatory = (!empty($area_private_mandatory)) ? 1 : 0;
- $area_provisional_enabled = (!empty($area_provisional_enabled)) ? 1 : 0;
+ $area_approval_enabled = (!empty($area_approval_enabled)) ? 1 : 0;
$area_reminders_enabled = (!empty($area_reminders_enabled)) ? 1 : 0;
if (!$enable_periods)
@@ -374,7 +374,7 @@
$assign_array[] = "private_default=" . $area_private_default;
$assign_array[] = "private_mandatory=" . $area_private_mandatory;
$assign_array[] = "private_override='" . $area_private_override . "'";
- $assign_array[] = "provisional_enabled=" . $area_provisional_enabled;
+ $assign_array[] = "approval_enabled=" . $area_approval_enabled;
$assign_array[] = "reminders_enabled=" . $area_reminders_enabled;
$sql .= implode(",", $assign_array) . " WHERE id=$area";
@@ -904,11 +904,11 @@
?>
<fieldset>
- <legend><?php echo get_vocab("provisional_settings")?></legend>
+ <legend><?php echo get_vocab("approval_settings")?></legend>
<div>
- <label for="area_provisional_enabled"><?php echo
get_vocab("enable_provisional")?>:</label>
- <?php $checked = ($provisional_enabled) ? " checked=\"checked\"" :
"" ?>
- <input class="checkbox" type="checkbox"<?php echo $checked ?>
id="area_provisional_enabled" name="area_provisional_enabled">
+ <label for="area_approval_enabled"><?php echo
get_vocab("enable_approval")?>:</label>
+ <?php $checked = ($approval_enabled) ? " checked=\"checked\"" : "" ?>
+ <input class="checkbox" type="checkbox"<?php echo $checked ?>
id="area_approval_enabled" name="area_approval_enabled">
</div>
<div>
<label for="area_reminders_enabled"><?php echo
get_vocab("enable_reminders")?>:</label>
Modified:
mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/edit_entry_handler.php
2010-09-01 08:38:11 UTC (rev 1430)
@@ -487,12 +487,12 @@
{
$status |= STATUS_PRIVATE; // Set the private bit
}
- // If we're using provisional booking then we need to work out whether the
- // status of this booking is confirmed. If the user is allowed to confirm
- // bookings for this room, then the status will be confirmed , since they
are
- // in effect immediately confirming their own booking. Otherwise the
booking
+ // If we are using booking approvals then we need to work out whether the
+ // status of this booking is approved. If the user is allowed to approve
+ // bookings for this room, then the status will be approved, since they are
+ // in effect immediately approving their own booking. Otherwise the
booking
// will need to approved.
- if ($provisional_enabled && !auth_book_admin($user, $room_id))
+ if ($approval_enabled && !auth_book_admin($user, $room_id))
{
$status |= STATUS_AWAITING_APPROVAL;
}
Modified: mrbs/branches/provisional_bookings_new_style/web/functions.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/functions.inc
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/functions.inc
2010-09-01 08:38:11 UTC (rev 1430)
@@ -491,18 +491,18 @@
global $resolution, $default_duration, $morningstarts,
$morningstarts_minutes, $eveningends, $eveningends_minutes;
global $private_enabled, $private_default, $private_mandatory,
$private_override;
global $min_book_ahead_enabled, $max_book_ahead_enabled,
$min_book_ahead_secs, $max_book_ahead_secs;
- global $provisional_enabled, $reminders_enabled;
+ global $approval_enabled, $reminders_enabled;
$booleans = array('private_enabled', 'private_default', 'private_mandatory',
'min_book_ahead_enabled', 'max_book_ahead_enabled',
- 'provisional_enabled', 'reminders_enabled');
+ 'approval_enabled', 'reminders_enabled');
// Get all the "per area" config settings
$sql = "SELECT resolution, default_duration, morningstarts,
morningstarts_minutes,
eveningends, eveningends_minutes,
private_enabled, private_default, private_mandatory,
private_override,
min_book_ahead_enabled, max_book_ahead_enabled,
min_book_ahead_secs, max_book_ahead_secs,
- provisional_enabled, reminders_enabled
+ approval_enabled, reminders_enabled
FROM $tbl_area
WHERE id=$area
LIMIT 1";
@@ -1262,7 +1262,7 @@
global $main_cell_height, $main_table_cell_border_width;
global $area, $year, $month, $timetohighlight;
global $javascript_cursor, $enable_periods, $times_along_top;
- global $provisional_enabled;
+ global $approval_enabled;
// if the time slot has got multiple bookings, then draw a mini-table
if(isset($cell[1]["id"]))
@@ -1307,9 +1307,9 @@
$descr = htmlspecialchars($cell[$n]["data"]);
$long_descr = htmlspecialchars($cell[$n]["long_descr"]);
$class = $color;
- if ($provisional_enabled && ($status & STATUS_AWAITING_APPROVAL))
+ if ($approval_enabled && ($status & STATUS_AWAITING_APPROVAL))
{
- $class .= " provisional";
+ $class .= " awaiting_approval";
}
if ($status & STATUS_PRIVATE)
{
@@ -1352,9 +1352,9 @@
$descr = htmlspecialchars($cell[$n]["start_time"] . " " .
$cell[$n]["data"]);
$long_descr = htmlspecialchars($cell[$n]["long_descr"]);
$class = $color;
- if ($provisional_enabled && ($status & STATUS_AWAITING_APPROVAL))
+ if ($approval_enabled && ($status & STATUS_AWAITING_APPROVAL))
{
- $class .= " provisional";
+ $class .= " awaiting_approval";
}
if ($status & STATUS_PRIVATE)
{
@@ -1403,9 +1403,9 @@
if (isset($id))
{
$c = $color;
- if ($provisional_enabled && ($status & STATUS_AWAITING_APPROVAL))
+ if ($approval_enabled && ($status & STATUS_AWAITING_APPROVAL))
{
- $c .= " provisional";
+ $c .= " awaiting_approval";
}
if ($status & STATUS_PRIVATE)
{
Modified: mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/functions_mail.inc
2010-09-01 08:38:11 UTC (rev 1430)
@@ -199,8 +199,8 @@
return $email;
}
-// get the list of email addresses that are allowed to approve
-// provisional bookings for the room with id $room_id
+// get the list of email addresses that are allowed to approve bookings
+// for the room with id $room_id
// (At the moment this is just the admin email address, but this could
// be extended.)
function get_approvers_email($room_id)
@@ -287,7 +287,7 @@
global $rep_enddate, $typel, $type, $status, $create_by, $rep_type,
$enable_periods;
global $rep_opt, $rep_num_weeks, $custom_fields, $standard_fields;
global $mail_previous, $auth, $note;
- global $mail_settings, $weekstarts, $provisional_enabled;
+ global $mail_settings, $weekstarts, $approval_enabled;
global $tbl_entry;
$recipients = array();
@@ -310,9 +310,9 @@
$from = $mail_settings['from'];
}
- // if we're using provisional bookings and this user needs approval
+ // if we're requiring bookings to be approved and this user needs approval
// for this room, then get the email addresses of the approvers
- if ($provisional_enabled && !auth_book_admin($user, $room_id))
+ if ($approval_enabled && !auth_book_admin($user, $room_id))
{
$recipients[] = get_approvers_email($room_id);
}
@@ -440,12 +440,12 @@
convertToMailCharset($mail_previous['description']),
$new_entry) . "\n";
- if ($provisional_enabled)
+ if ($approval_enabled)
{
// Approval status:
$body .= get_mail_vocab("status") . ": ";
- $old_approval_status = ($mail_previous['status'] &
STATUS_AWAITING_APPROVAL) ? get_mail_vocab("provisional") :
get_mail_vocab("confirmed");
- $new_approval_status = ($status & STATUS_AWAITING_APPROVAL) ?
get_mail_vocab("provisional") : get_mail_vocab("confirmed");
+ $old_approval_status = ($mail_previous['status'] &
STATUS_AWAITING_APPROVAL) ? get_mail_vocab("awaiting_approval") :
get_mail_vocab("confirmed");
+ $new_approval_status = ($status & STATUS_AWAITING_APPROVAL) ?
get_mail_vocab("awaiting_approval") : get_mail_vocab("confirmed");
$body .= compareEntries($new_approval_status, $old_approval_status,
$new_entry) . "\n";
}
Modified:
mrbs/branches/provisional_bookings_new_style/web/internalconfig.inc.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/internalconfig.inc.php
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/internalconfig.inc.php
2010-09-01 08:38:11 UTC (rev 1430)
@@ -100,7 +100,7 @@
// get_area_settings(). [This isn't a very elegant way of handling
// per-area settings and perhaps ought to be revisited at some stage]
$area_defaults = array();
- $area_defaults['provisional_enabled'] = $provisional_enabled;
+ $area_defaults['approval_enabled'] = $approval_enabled;
/********************************************************
* PHP System Configuration - internal use, do not change
Modified: mrbs/branches/provisional_bookings_new_style/web/lang.en
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/lang.en 2010-08-31
15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/lang.en 2010-09-01
08:38:11 UTC (rev 1430)
@@ -107,7 +107,7 @@
$vocab["invalid_series_id"] = "Invalid series id.";
$vocab["status"] = "Status";
$vocab["confirmed"] = "Confirmed booking";
-$vocab["provisional"] = "Provisional booking";
+$vocab["awaiting_approval"] = "Awaiting approval";
$vocab["accept"] = "Accept";
$vocab["reject"] = "Reject";
$vocab["more_info"] = "More Info";
@@ -154,8 +154,8 @@
$vocab["max_time_before"] = "The maximum interval between now and the
start of a booking is";
// Used in pending.php
-$vocab["pending"] = "Provisional bookings awaiting approval";
-$vocab["none_outstanding"] = "You have no provisional bookings waiting to be
approved.";
+$vocab["pending"] = "Bookings awaiting approval";
+$vocab["none_outstanding"] = "You have no bookings waiting to be approved.";
// Authentication stuff
$vocab["accessdenied"] = "Access Denied";
@@ -314,8 +314,8 @@
$vocab["too_many_slots"] = 'You need to increase the value of
$max_slots in the config file!';
$vocab["general_settings"] = "General";
$vocab["time_settings"] = "Slot times";
-$vocab["provisional_settings"] = "Provisional bookings";
-$vocab["enable_provisional"] = "Enable provisional bookings";
+$vocab["approval_settings"] = "Approval settings";
+$vocab["enable_approval"] = "Require bookings to be approved";
$vocab["enable_reminders"] = "Allow users to remind admins";
$vocab["private_settings"] = "Private bookings";
$vocab["allow_private"] = "Allow private bookings";
Modified: mrbs/branches/provisional_bookings_new_style/web/lang.ja
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/lang.ja 2010-08-31
15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/lang.ja 2010-09-01
08:38:11 UTC (rev 1430)
@@ -107,7 +107,7 @@
$vocab["invalid_series_id"] = "無効な定例予約IDです。";
$vocab["status"] = "状況";
$vocab["confirmed"] = "確認予約";
-$vocab["provisional"] = "仮予約";
+$vocab["awaiting_approval"] = "仮予約";
$vocab["accept"] = "承認";
$vocab["reject"] = "棄却";
$vocab["more_info"] = "詳細情報";
@@ -308,8 +308,8 @@
$vocab["too_many_slots"] = '設定ファイルの\$max_slotsの値を増やす必要があります!';
$vocab["general_settings"] = "一般";
$vocab["time_settings"] = "時間枠";
-$vocab["provisional_settings"] = "仮予約";
-$vocab["enable_provisional"] = "仮予約を有効にする";
+$vocab["approval_settings"] = "仮予約";
+$vocab["enable_approval"] = "仮予約を有効にする";
$vocab["enable_reminders"] = "ユーザに管理者へ備忘通知することを許可する";
$vocab["private_settings"] = "私用予約";
$vocab["allow_private"] = "私用予約を許可する";
Modified: mrbs/branches/provisional_bookings_new_style/web/language.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/language.inc
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/language.inc
2010-09-01 08:38:11 UTC (rev 1430)
@@ -340,7 +340,7 @@
// Get first default set of language tokens for emails.
$need_to_send_mail = ($mail_settings['admin_on_bookings'] or
$mail_settings['area_admin_on_bookings'] or
$mail_settings['room_admin_on_bookings'] or
$mail_settings['booker'] or
- $mail_settings['book_admin_on_provisional']);
+ $mail_settings['book_admin_on_approval']);
if ($need_to_send_mail)
{
include "lang." . $default_language_tokens;
Modified: mrbs/branches/provisional_bookings_new_style/web/month.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/month.php 2010-08-31
15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/month.php 2010-09-01
08:38:11 UTC (rev 1430)
@@ -536,9 +536,9 @@
// give the enclosing div the appropriate width: full width if both,
// otherwise half-width (but use 49.9% to avoid rounding problems in
some browsers)
$class = $d[$cday]["color"][$i];
- if ($provisional_enabled && ($d[$cday]["status"][$i] &
STATUS_AWAITING_APPROVAL))
+ if ($approval_enabled && ($d[$cday]["status"][$i] &
STATUS_AWAITING_APPROVAL))
{
- $class .= " provisional";
+ $class .= " awaiting_approval";
}
if ($d[$cday]["status"][$i] & STATUS_PRIVATE)
{
Modified: mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
2010-09-01 08:38:11 UTC (rev 1430)
@@ -426,13 +426,13 @@
.minimized div.mini {display: block}
.minimized div.maxi {display: none}
-/* private bookings */
+/* booking privacy status */
.private {opacity: 0.6; font-style: italic}
-/* provisional bookings */
-.provisional {opacity: 0.6}
-.provisional a {font-weight: normal}
-.provisional a:before {content: "? "}
+/* booking approval status */
+.awaiting_approval {opacity: 0.6}
+.awaiting_approval a {font-weight: normal}
+.awaiting_approval a:before {content: "? "}
/* ------------ DEL.PHP -----------------------------*/
Modified: mrbs/branches/provisional_bookings_new_style/web/mrbs_auth.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/mrbs_auth.inc
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/mrbs_auth.inc
2010-09-01 08:38:11 UTC (rev 1430)
@@ -215,7 +215,7 @@
//
// Checks whether $user is allowed has booking administration rights
// for $room - ie is allowed to modify and delete other people's bookings
-// and to confirm provisional bookings.
+// and to approve bookings.
//
// At the moment $room is ignored, but is passed here so that later
// it can be enhanced to provide fine-grained permissions
Modified: mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/mrbs_sql.inc
2010-09-01 08:38:11 UTC (rev 1430)
@@ -811,7 +811,7 @@
function mrbsGetBookingInfo($id, $series, $silent=FALSE)
{
global $tbl_entry, $tbl_repeat, $tbl_room, $tbl_area;
- global $provisional_enabled;
+ global $approval_enabled;
// Check that we've got an id
if (!isset($id))
Modified: mrbs/branches/provisional_bookings_new_style/web/pending.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/pending.php
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/pending.php
2010-09-01 08:38:11 UTC (rev 1430)
@@ -159,16 +159,16 @@
echo "<h1>" . get_vocab("pending") . "</h1>\n";
-// Get a list of all the provisional bookings
-// We are only interested in areas where provisional bookings are enabled
+// Get a list of all bookings awaiting approval
+// We are only interested in areas where approval is required
-// Build the SQL condition for evaluating whether provisional booking is
-// enabled for an area. It is enabled if the field is set, or if it's
+// Build the SQL condition for evaluating whether approval is
+// required for an area. It is enabled if the field is set, or if it's
// not set but the default area setting is for it to be enabled.
-$sql_provisional_enabled = "(provisional_enabled IS NOT NULL AND
provisional_enabled > 0)";
-if ($area_defaults['provisional_enabled'])
+$sql_approval_enabled = "(approval_enabled IS NOT NULL AND approval_enabled >
0)";
+if ($area_defaults['approval_enabled'])
{
- $sql_provisional_enabled = "(" . $sql_provisional_enabled . " OR
(provisional_enabled IS NULL))";
+ $sql_approval_enabled = "(" . $sql_approval_enabled . " OR (approval_enabled
IS NULL))";
}
$sql = "SELECT E.id, E.name, E.room_id, E.start_time, E.create_by, " .
@@ -181,7 +181,7 @@
LEFT JOIN $tbl_repeat AS T ON E.repeat_id=T.id
WHERE E.room_id = M.id
AND M.area_id = A.id
- AND $sql_provisional_enabled
+ AND $sql_approval_enabled
AND E.status&" . STATUS_AWAITING_APPROVAL . ">0";
// Ordinary users can only see their own bookings
Modified:
mrbs/branches/provisional_bookings_new_style/web/systemdefaults.inc.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/systemdefaults.inc.php
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/systemdefaults.inc.php
2010-09-01 08:38:11 UTC (rev 1430)
@@ -439,21 +439,19 @@
// changing to "public" or from "private" to "none"
-// PROVISIONAL BOOKINGS SETTINGS - PER-AREA
+// SETTINGS FOR APPROVING BOOKINGS - PER-AREA
-// These settings control whether provisional bookings should be used.
-// If provisional bookings are enabled then ordinary users must have their
-// bookings confirmed by an admin. The settings here are the default
-// settings for new areas. The settings for individual areas can be
-// changed from within MRBS.
+// These settings control whether bookings made by ordinary users need to be
+// approved by an admin. The settings here are the default settings for new
+// areas. The settings for individual areas can be changed from within MRBS.
-$provisional_enabled = FALSE; // Set to TRUE to enable provisional bookings
+$approval_enabled = FALSE; // Set to TRUE to enable booking approval
// Set to FALSE if you don't want users to be able to send reminders
-// to admins if provisional bookings have not been approved
+// to admins when bookings are still awaiting approval.
$reminders_enabled = TRUE;
-// PROVISIONAL BOOKINGS SETTINGS - GLOBAL
+// SETTINGS FOR APPROVING SETTINGS - GLOBAL
// These settings are system-wide and control the behaviour in all areas.
@@ -654,13 +652,13 @@
// Set to TRUE or FALSE as required
// (Note: the email addresses for the room and area administrators are set
from the
// edit_area_room.php page in MRBS)
-$mail_settings['admin_on_bookings'] = FALSE; // the addresses defined
by $mail_settings['recipients'] below
-$mail_settings['area_admin_on_bookings'] = FALSE; // the area administrator
-$mail_settings['room_admin_on_bookings'] = FALSE; // the room administrator
-$mail_settings['booker'] = FALSE; // the person making the
booking
-$mail_settings['book_admin_on_provisional'] = FALSE; // the booking
administrator when provisional bookings are enabled
- // (which is the MRBS
admin, but this setting allows MRBS
- // to be extended to
have separate booking approvers)
+$mail_settings['admin_on_bookings'] = FALSE; // the addresses defined by
$mail_settings['recipients'] below
+$mail_settings['area_admin_on_bookings'] = FALSE; // the area administrator
+$mail_settings['room_admin_on_bookings'] = FALSE; // the room administrator
+$mail_settings['booker'] = FALSE; // the person making the
booking
+$mail_settings['book_admin_on_approval'] = FALSE; // the booking
administrator when booking approval is enabled
+ // (which is the MRBS
admin, but this setting allows MRBS
+ // to be extended to have
separate booking approvers)
// WHEN TO EMAIL
// -------------
Added: mrbs/branches/provisional_bookings_new_style/web/upgrade/17/mysql.sql
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/upgrade/17/mysql.sql
(rev 0)
+++ mrbs/branches/provisional_bookings_new_style/web/upgrade/17/mysql.sql
2010-09-01 08:38:11 UTC (rev 1430)
@@ -0,0 +1,6 @@
+# $Id$
+
+# Rename provisional bookings
+
+ALTER TABLE %DB_TBL_PREFIX%area
+CHANGE provisional_enabled approval_enabled tinyint(1);
Property changes on:
mrbs/branches/provisional_bookings_new_style/web/upgrade/17/mysql.sql
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: mrbs/branches/provisional_bookings_new_style/web/upgrade/17/pgsql.sql
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/upgrade/17/pgsql.sql
(rev 0)
+++ mrbs/branches/provisional_bookings_new_style/web/upgrade/17/pgsql.sql
2010-09-01 08:38:11 UTC (rev 1430)
@@ -0,0 +1,6 @@
+-- $Id$
+
+-- Rename provisional bookings
+
+ALTER TABLE %DB_TBL_PREFIX%area
+RENAME COLUMN provisional_enabled TO approval_enabled;
Property changes on:
mrbs/branches/provisional_bookings_new_style/web/upgrade/17/pgsql.sql
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: mrbs/branches/provisional_bookings_new_style/web/view_entry.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/view_entry.php
2010-08-31 15:23:41 UTC (rev 1429)
+++ mrbs/branches/provisional_bookings_new_style/web/view_entry.php
2010-09-01 08:38:11 UTC (rev 1430)
@@ -60,8 +60,8 @@
$this_page = basename($PHP_SELF);
- // Remind button if you're the owner AND there's a provisional
- // booking outstanding AND sufficient time has passed since the last reminder
+ // Remind button if you're the owner AND there's a booking awaiting
+ // approval AND sufficient time has passed since the last reminder
// AND we want reminders in the first place
if (($reminders_enabled) &&
($user == $create_by) &&
@@ -352,9 +352,9 @@
echo "<tr><td> </td><td class=\"error\">" . get_vocab($error) .
"</td></tr>\n";
}
-// If we're using provisional bookings, put the buttons to do with managing
+// If bookings require approval, put the buttons to do with managing
// the bookings in the footer
-if ($provisional_enabled && ($status & STATUS_AWAITING_APPROVAL))
+if ($approval_enabled && ($status & STATUS_AWAITING_APPROVAL))
{
echo "<tfoot id=\"confirm_buttons\">\n";
// PHASE 2 - REJECT
@@ -438,11 +438,11 @@
?>
</tr>
<?php
- if ($provisional_enabled)
+ if ($approval_enabled)
{
echo "<tr>\n";
echo "<td>" . get_vocab("status") . ":</td>\n";
- echo "<td>" . (($status & STATUS_AWAITING_APPROVAL) ?
get_vocab("provisional") : get_vocab("confirmed")) . "</td>\n";
+ echo "<td>" . (($status & STATUS_AWAITING_APPROVAL) ?
get_vocab("awaiting_approval") : get_vocab("confirmed")) . "</td>\n";
echo "</tr>\n";
}
?>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits