Revision: 1332
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1332&view=rev
Author:   cimorrison
Date:     2010-04-20 21:38:16 +0000 (Tue, 20 Apr 2010)

Log Message:
-----------
- Tidied up and updated the INSTALL information;  tried to avoid duplication of 
information between INSTALL and systemdefaults.inc.php
- Renamed the tables.pg sql files so that tables.pg.sql is the file to use for 
the latest version of PostgreSQL

Modified Paths:
--------------
    mrbs/trunk/INSTALL
    mrbs/trunk/web/systemdefaults.inc.php

Added Paths:
-----------
    mrbs/trunk/tables.pg.pre73.sql
    mrbs/trunk/tables.pg.sql

Removed Paths:
-------------
    mrbs/trunk/tables.pg.73and_above.sql
    mrbs/trunk/tables.pg.sql

Modified: mrbs/trunk/INSTALL
===================================================================
--- mrbs/trunk/INSTALL  2010-04-20 20:16:35 UTC (rev 1331)
+++ mrbs/trunk/INSTALL  2010-04-20 21:38:16 UTC (rev 1332)
@@ -4,17 +4,15 @@
 
 REQUIREMENTS
 ---------------------------------------------------------------------------
-MRBS works with both MySQL and PostgreSQL 6.5 to 7.2 database systems. You must
-have PHP with support for your chosen database system installed and working
-for this application. See the PHP (www.php.net), MySQL (www.mysql.com), and
-PostgreSQL (www.postgresql.org) sites for more info on setting these up.
-You need to know how to install, secure, run, maintain, and back up your
-chosen database system.
+MRBS works with both MySQL (Version 4 and above) and PostgreSQL (Version 7 
+and above) systems. You must have PHP with support for your chosen database
+system installed and working for this application. See the PHP (www.php.net),
+MySQL (www.mysql.com), and PostgreSQL (www.postgresql.org) sites for more 
+info on setting these up.   You need to know how to install, secure, run, 
+maintain, and back up your chosen database system.
 
 No optional PHP packages (other than the database system) are required for
-this application. This version of MRBS was tested with PHP 4.3.2 and
-somewhat with PHP 5.1.2. Older versions of PHP 4 may work, but PHP 3 is
-unsupported.
+this application.  PHP Version 4 or later is required.
 
 You can run PHP either as a CGI or with a direct module interface (also called 
 SAPI). These servers include Apache, Microsoft Internet Information Server, 
@@ -26,19 +24,14 @@
 the maximum number of connections allowed to your database; with connection
 pooling PHP/Apache can potentially create a connection from each Apache
 child server to the database. 
-Also many mrbs authentication schemes use basic http authentication. These 
+Also many MRBS authentication schemes use basic HTTP authentication. These 
 don't work if you run PHP as a CGI.
 
 If you are using PHP as an Apache module, you probably want to ensure that
 the Apache MaxRequestsPerChild is not set to 0, in case of undetected memory
 leaks in PHP or MRBS.
 
-If you use MySQL, versions 3.22.32, 3.23.23, 3.23.53, 4.0.13, 4.0.14 and
-5.0.18 have been tested and reported to work.
 
-If you use PostgreSQL, you will need at least version 7.0, versions 7.0.3
-and 8.1.4 has been tested and reported to work.
-
 FILE UNPACKING
 ---------------------------------------------------------------------------
 To install MRBS, just unpack the distribution into a temporary directory,
@@ -62,12 +55,9 @@
 distribution somewhere your web server can find it.  For example:
     $ cp -r web /var/lib/apache/htdocs/mrbs
 
+    
 DATABASE SETUP
 ---------------------------------------------------------------------------
-If you are upgrading from MRBS version 0.7 or later, and continuing to
-use MySQL, your database is already set up, so you can skip to the
-Application Setup section.
-
 For a new install:
 
 You can place the MRBS database tables in an existing database or
@@ -103,6 +93,11 @@
 
 For an upgrade:
 
+If you are upgrading from MRBS version 0.7 or later, and continuing to
+use MySQL, your database will be upgraded automatically if necessary
+when you first run MRBS.   You will be prompted for a database (not MRBS)
+username and password with rights to create and alter tables.
+
 The database format changed slightly between 0.6 and 0.7. To change the
 format of your data do:
 
@@ -120,7 +115,7 @@
 In tables.*.sql you will need to change the table names and then follow
 the instructions above for creating the tables in your database.
 
-When editting config.inc.php, you need to change the table name prefix
+When editing config.inc.php, you need to change the table name prefix
 from "mrbs_" to the value you chose using the variable $db_tbl_prefix.
 
 WARNING: All of the .sql files are setup to use the 'mrbs_' prefix
@@ -138,7 +133,7 @@
 
 
 ADDING EXTRA COLUMNS TO THE DATABASE TABLES
--------------------------------------------
+---------------------------------------------------------------------------
 It is possible to add extra columns to the room and users tables, if you need
 to hold extra information about rooms and users.   For example you might want
 to add a column in the room table to record whether or not a room has a coffee
@@ -183,15 +178,19 @@
 ---------------------------------------------------------------------------
 Next, you will need to customize the file "config.inc.php"...
 
-If you are upgrading from a previous version of MRBS, use your saved
-copy of "config.inc.php" as a reference. Do not just use your old 
config.inc.php
-file, however, because there changes and new settings.
+As a minimum you will need to set the timezone and the database variables.
+Other settings can be changed by copying lines from systemdefaults.inc.php and
+oasting them into config.inc.php.   Do not edit systemdefaults.inc.php as it
+will make it harder for you to upgrade when new versions are released.
 
-Refer to the comments in the supplied config.inc.php file for more details.
-The following sections can be configured:
+1.  Timezone
 
+You must set the timezone to a valid value, a list of which can be found at
+http://php.net/manual/en/timezones.php.   Note that the timezone to use is the
+timezone in which your meeting rooms are located, not the timezone of your
+server in case they are different.
 
-1. Database Settings:
+2.  Database Settings:
 
 First, select your database system. Define one of the following:
 
@@ -226,367 +225,51 @@
 
     $db_tbl_prefix = The table name prefix
 
+    
+3.  Other Settings
 
-2. Site Identification:
+Now go through systemdefaults.inc.php and see which other configuration 
settings 
+you would like to change.   Do this by copying them to config.inc.php and 
changing
+them there.   This should make the task of upgrading to new releases easier as 
all 
+your site-specific configuration changes will be confined to config.inc.php.
 
-Specify your company or site name, and contact information. The company name
-is displayed at the top of each page, and the contact information is
-displayed in the help file.
+There is a wide variety of settings that can be changed, including
 
-    $mrbs_admin = "Your Administrator";
-    $mrbs_admin_email = "[email protected]";
-    $mrbs_company = "Your Company";
+- site identification information
+- themes
+- calendar settings
+- booking policies
+- display and time format settings
+- private bookings settings
+- provisisional bookings settings
+- authentication settings
+- email settings
+- language settings
+- report settings
+- entry types
 
-Alternately, if you want to display your organization logo, replace the 
-$mrbs_company line like this :
+The comments in the systemdefaults.inc.php file should explain the purpose of 
the
+various configuration variables and how to change them.    (Note that some of 
the
+settinngs can be set on a per-area basis through the area administration page 
in MRBS.
+In this case the setting in the systemdefaults.inc.php/config.inc.php file 
defines
+the default settings for new areas.)
 
-$mrbs_company = "<a href=http://www.your_organization.com/><img 
src=your_logo.gif border=0></a>";
+The Help information is held in the site_faq files, one per language.  You may 
well
+want to customise it by editing the files.
 
-$url_base = "";
 
-This is to fix URL problems when using a proxy in the environment
-If links inside MRBS appear broken, then specify here the URL of
-your MRBS root directory, as seen by the users. For example:
+CHANGING TEXT STRINGS
+---------------------------------------------------------------------------
 
-$url_base =  "http://webtools.uab.ericsson.se/oam";;
+All the text strings used by MRBS, except those used on the Help page, are 
held in a
+series of lang.* files, for example lang.en for English, or lang.fr for 
French.   If
+you want to change some of the text strings used by MRBS, for example change 
"Room" 
+to "Computer", then look for the appropriate string in the lang files and edit 
it.
 
-It is also recommended that you set this if you intend to use email
-notifications, to ensure that the correct URL is displayed in the
-notification.
 
+INTERNATIONALISATION
+---------------------------------------------------------------------------
 
-3. Calendar Settings:
-
-There are two options here:
-- regular consecutive booking periods (default)
-  for example: every half hour period from 7 AM to 7 PM can be booked
-- user-defined periods
-  for example: school periods where periods are of different lengths
-  and are not consecutive because of change-over time or breaks.
-
-It is not possible to swap between these two options once bookings have
-been created and to have meaningful entries.  This is due to differences
-in the way that the data is stored.
-
-The settings for each option are described below:
-
-    a) Regular Consecutive periods
-    Specify the resolution in minutes. MRBS will display blocks of this size,
-    and will round up all entries to an even multiple of this many minutes.
-    Specify a number which divides evenly into hours, for example one of:
-
-        $resolution =  900;   # 15 minutes
-        $resolution = 1800;   # Half hour
-        $resolution = 3600;   # Whole hours
-
-    Specify the start and end of the day in 24 hour notation, using whole
-    hours.
-
-        $morningstarts = 7;   # First block is 7 AM.
-        $eveningends = 19;    # Last block starts at 7 PM.
-
-    For additional control there are $morningstarts_minutes and
-    $eveningends_minutes.
-
-    $morningstarts_minutes gives you more control over the starting block
-    displayed for each day.  For example, to start a day at
-    8:30 am:
-
-        $morningstarts = 8;
-        $morningstarts_minutes = 30;
-
-    $eveningends_minutes gives you more control over the last block displayed
-    for each day. For example, to display full 24 hour days with 30 minute
-    intervals:
-
-        $resolution = 1800;
-        $morningstarts = 0;
-        $eveningends = 23;
-        $eveningends_minutes = 30;
-
-    Note: Be careful to avoid specifying options that display blocks
-    overlaping the next day, since it is not properly handled.
-
-    b) User-defined periods
-    To enable this option set
-        $enable_periods = TRUE;
-
-    Then define the names of the periods that you wish to use in chronological
-    order.  This is a free-form field and can contain anything, such as a
-    descriptive name for the period or the start and end time.
-
-    For example:
-        $periods[] = "Period&nbsp;1";
-        $periods[] = "Period&nbsp;2";
-        ...
-    or
-        $periods[] = "09:15&nbsp;-&nbsp;09:50";
-        $periods[] = "09:55&nbsp;-&nbsp;10:35";
-        ...
-
-    &nbsp; is used to ensure that the name or description is not wrapped
-    when the browser determines the column widths to use in day and week
-    views.
-
-    A maximum of 60 periods may be defined.
-
-    Note:
-    1) Changing the number of periods after bookings have been entered may
-    lead to incorrect reservations being displayed where the booking does not
-    end on the day that it starts.
-    2) The periods bear no relation to clock time during a day.
-
-
-To control international preferences for the calendar displays, 
-
-- use $weekstarts to change the first day of the week from the default of
-Sunday; 
-- use $dateformat to show dates as "Month Day" or "Day Month"
-in the page footers;
-- use $twentyfourhour_format to show dates in 12 or 24 hour
-format.
-
-
-4. Miscellaneous Settings:
-
-These settings control:
-
-- the maximum number of repeat entries which can be created at once (a safety
-  feature),
-- the default report time period,
-- the number of search results to return per page,
-- the page refresh rate,
-- the way area/rooms are selected (html list or a drop-down select box),
-- the way entries are displayed in monthly view (start/end slot, brief
-  description or both),
-- the way weeks are displayed in the bottom of the page (as week numbers (ie.
-  42) instead of 'first day of the week' (13 Oct)),
-- display of times on right and left side in day and week view,
-- display of horizontal stripes on the day view,
-- cells highlighting options,
-- the default starting view (month, week or day),
-- the default room to start with.
-
-
-5. Authentication:
-
-Read the file AUTHENTICATION for information about this section. By default, 
-config.inc.php uses "php" session management and "config" authentication 
-method, allowing only demo users to book rooms, and "administrator" is defined 
-to administer the system. Demo users are "alice" and "bob" (passwords "a" and 
-"b") and "administrator" (password 'secret') is administrator.
-
-
-6. Email support:
-
-MRBS can send emails to various recipients and in accordance with events.
-
-There are four recipients types:
-
-- MRBS administrator
-- Area administrators
-- Room administrators
-- Bookers
-
-With settings described below, you can decide that MRBS sends emails to all
-these recipients, or any combination of them. Each one can be selected
-individually. Note that the word 'administrator' is used here only for mail
-purposes, it is not related to any approval workflow.
-
-There are three events types:
-
-- entry creation
-- entry change
-- entry deletion
-
-As for recipients, you can choose to send mails for any of these three events.
-
-There are many other settings, including mail transport agent (php mail, smtp
-server, unix sendmail), content of the mail subject and body, either a link to
-the entries or full description (with changes between edited entry and its
-previous state). Read the following parameters for detailed informations:
-
-MAIL_ADMIN_ON_BOOKINGS
-
-Set to TRUE if you want to be notified when entries are booked. Default is
-FALSE
-
-MAIL_AREA_ADMIN_ON_BOOKINGS
-
-Set to TRUE if you want AREA ADMIN to be notified when entries are booked.
-Default is FALSE. Area admin emails are set in room_area admin page.
-
-MAIL_ROOM_ADMIN_ON_BOOKINGS
-
-Set to TRUE if you want ROOM ADMIN to be notified when entries are booked.
-Default is FALSE. Room admin emails are set in room_area admin page.
-
-MAIL_ADMIN_ON_DELETE
-
-Set to TRUE if you want ADMIN to be notified when entries are deleted. Email
-will be sent to mrbs admin, area admin and room admin as per above settings,
-as well as to booker if MAIL_BOOKER is TRUE (see below).
-
-MAIL_ADMIN_ALL
-
-Set to TRUE if you want to be notified on every change (i.e, on new entries)
-but also each time they are edited. Edited entries will display the modified
-fields in brackets after the new value if MAIL_DETAILS is set to TRUE
-(see below). Default is FALSE (only new entries).
-
-MAIL_DETAILS
-
-Set to TRUE is you want to show entry details in email, otherwise only a
-link to view_entry is provided. Irrelevant for deleted entries, as email body
-will always have entry details, since there is no possibility to provide a
-link. Default is FALSE.
-
-MAIL_BOOKER
-
-Set to TRUE if you want the entry booker to receive a copy of his entry as
-well as any future changes (depends of MAIL_ADMIN_ALL, see below). Default
-is FALSE. MRBS can turn some of your user databases to advantage, as there
-are several authentication schemes where the username is the same as
-the email address username .For example, if your mrbs users come from an
-ldap directory and mrbs use this authentication scheme, it is likely your
-organisation emails addresses will use this username with '@domain'. If
-this is the case, you just have to set MAIL_BOOKER to TRUE and provide your
-domain below. This setting is available too if you use MRBS own user
-database (auth_db).
-
-MAIL_DOMAIN
-
-If MAIL_BOOKER is set to TRUE (see above) and you use an authentication
-scheme other than 'auth_db', you need to provide the mail domain that will
-be appended to the username to produce a valid email address (ie.
-"@domain.com").
-
-MAIL_USERNAME_SUFFIX
-
-If you use MAIL_DOMAIN above and username returned by mrbs contains extra
-strings appended like domain name ('username.domain'), you need to provide
-this extra string here so that it will be removed from the username.
-
-MAIL_ADMIN_BACKEND
-
-Set the name of the backend to use to transport your mails. Either "mail",
-"smtp" or "sendmail":
-
-\xB7   mail
-Sends a mail using PHPs build-in mail()-function. This means this function
-must not be disabled and you have a minimal control over your server and
-settings in php.ini :
-    'SMTP' and 'smtp_port' for Windows and 'sendmail_from' and 'sendmail_path'
-    for Unix
-
-\xB7   sendmail
-Sends a mail using a sendmail unix program.
-
-\xB7   smtp
-Sends a mail connecting directly to an smtp server.
-
-# Sendmail settings
-
-SENDMAIL_PATH
-
-Set the path of the Sendmail program (only used with "sendmail" backend).
-Default is "/usr/bin/sendmail"
-
-SENDMAIL_ARGS
-
-Set additional Sendmail parameters (only used with "sendmail" backend).
-(example "-t -i"). Default is ""
-
-# SMTP settings
-
-SMTP_HOST
-
-Set smtp server to connect. Default is 'localhost' (only used with "smtp"
-backend).
-
-SMTP_PORT
-
-Set smtp port to connect. Default is '25' (only used with "smtp" backend).
-
-SMTP_AUTH
-
-Set whether or not to use SMTP authentication. Default is 'FALSE'
-
-SMTP_USERNAME
-
-Set the username to use for SMTP authentication. Use only if SMTP_AUTH is
-set to TRUE. Default is ''
-
-SMTP_PASSWORD
-
-Set the password to use for SMTP authentication. Use only if SMTP_AUTH is
-set to TRUE. Default is ''
-
-# Miscellaneous settings
-
-MAIL_ADMIN_LANG
-
-Set the language used for emails (chooses from an available lang.* file).
-Default is 'en'.
-
-MAIL_FROM
-
-Set the email address of the From field. Default is the $mrbs_admin_email
-variable.
-
-MAIL_RECIPIENTS
-
-Set the recipient email. Default is $mrbs_admin_email. You can define
-more than one recipient like this "[email protected],[email protected]"
-
-MAIL_CC
-
-Set email address of the Carbon Copy field. Default is ''. You can define
-more than one recipient (see MAIL_RECIPIENTS)
-
-$mail["subject"]
-
-Set the content of the Subject field. Default is
-"Entry added/changed for $mrbs_company MRBS"
-
-$mail["subject_delete"]
-
-Set the content of the Subject field for deleted fields. Default is
-"Entry deleted for $mrbs_company MRBS";
-
-$mail["new_entry"]
-
-Set the content of the message when a new entry is booked. What you type
-here will be added at the top of the message body. Default is:
-"A new entry has been booked, here are the details:"
-
-$mail["changed_entry"]
-
-Set the content of the message when an entry is modified. What you type
-here will be added at the top of the message body. Default is:
-"An entry has been modified, here are the details:"
-
-$mail["deleted_entry"]
-
-Set the content of the message when an entry is deleted. What you type
-here will be added at the top of the message body. Default is
-"An entry has been deleted, here are the details:"
-
-
-7. Language:
-
-MRBS supports multiple languages, which can be used at the same time, based on 
-what the client is using. Users can configure their web browsers to prefer
-one language over another, and MRBS will attempt to serve the MRBS pages in
-the user's preferred language. You can specify the default language in
-config.inc.php. See the file called LANGUAGE for more info.
-
-MRBS also uses your server's OS locale support to localise date/time strings.
-MRBS attempts to figure out what locale should be used based on your
-preferred language and the server OS. Use "locale -a" on your unix system to
-find out what locale support is installed. On Windows any language supported
-by Windows should work.
-
 From mrbs-1.2-pre2, MRBS is internationalised as long as the config
 variable $unicode_encoding is set to 1 (which is the default setting). 
 If this is set, then MRBS serves all of its pages in UTF-8 and stores
@@ -624,20 +307,6 @@
   this script if you are at all worried.
 
 
-8. Entry Types:
-
-By default, MRBS defines two "meeting types" - internal and external. There
-are a total of 10 types ready to be used, if you assign names to them in
-your config.inc.php file. Each type has a color, defined in the style sheet.
-
-
-HELP/FAQ File:
-
-Customize site_faq.html if desired.  It contains help that can be tailored
-to your environment. Currently this help is available in a number of
-languages.
-
-
 SECURITY NOTES!
 ---------------------------------------------------------------------------
 You can configure your web server so that users can not obtain the ".inc"

Deleted: mrbs/trunk/tables.pg.73and_above.sql
===================================================================
--- mrbs/trunk/tables.pg.73and_above.sql        2010-04-20 20:16:35 UTC (rev 
1331)
+++ mrbs/trunk/tables.pg.73and_above.sql        2010-04-20 21:38:16 UTC (rev 
1332)
@@ -1,127 +0,0 @@
--- $Id$
---
--- MRBS table creation script - for PostgreSQL 7.3 and above
---
--- Notes:
--- MySQL inserts the current date/time into any timestamp field which is not
--- specified on insert. To get the same effect, use PostgreSQL default
--- value current_timestamp.
--- This script is EXPERIMENTAL. PostGreSQL folks have changed some features 
--- with 7.3 version which breaks many application, including mrbs :
--- - An empty string ('') is no longer allowed as the input into an
---   integer field. Formerly, it was silently interpreted as 0. If you want 
---   a field to be 0 then explicitly use 0, if you want it to be undefined 
---   then use NULL.
--- - "INSERT" statements with column lists must specify all values;
---   e.g., INSERT INTO tab (col1, col2) VALUES ('val1') is now invalid
--- This tables creation script now works with 7.3, but the second issue above
--- is already there, so currently mrbs does NOT work with pgsql 7.3 and above
--- (thierry_bo 2003-12-03)
---
--- If you have decided to change the prefix of your tables from 'mrbs_'
--- to something else using $db_tbl_prefix then you must edit each
--- 'CREATE TABLE', 'create index' and 'INSERT INTO' line below to replace
--- 'mrbs_' with your new table prefix.
---
--- If you change the varchar lengths here, then you should check
--- to see whether a corresponding length has been defined in the config file
--- in the array $maxlength.
-
-
-CREATE TABLE mrbs_area
-(
-  id                     serial primary key,
-  area_name              varchar(30),
-  area_admin_email       text,
-  resolution             int,
-  default_duration       int,
-  morningstarts          int,
-  morningstarts_minutes  int,
-  eveningends            int,
-  eveningends_minutes    int,
-  private_enabled        smallint,
-  private_default        smallint,
-  private_mandatory      smallint,
-  private_override       varchar(32),
-  min_book_ahead_enabled smallint,
-  min_book_ahead_secs    int,
-  max_book_ahead_enabled smallint,
-  max_book_ahead_secs    int,
-  custom_html            text,
-  provisional_enabled    smallint,
-  reminders_enabled      smallint
-);
-
-CREATE TABLE mrbs_room
-(
-  id                serial primary key,
-  area_id           int DEFAULT 0 NOT NULL,
-  room_name         varchar(25) NOT NULL,
-  sort_key          varchar(25) NOT NULL,
-  description       varchar(60),
-  capacity          int DEFAULT 0 NOT NULL,
-  room_admin_email  text,
-  custom_html       text
-);
-create index idxSortKey on mrbs_room(sort_key);
-
-CREATE TABLE mrbs_entry
-(
-  id          serial primary key,
-  start_time  int DEFAULT 0 NOT NULL,
-  end_time    int DEFAULT 0 NOT NULL,
-  entry_type  int DEFAULT 0 NOT NULL,
-  repeat_id   int DEFAULT 0 NOT NULL,
-  room_id     int DEFAULT 1 NOT NULL,
-  timestamp   timestamp DEFAULT current_timestamp,
-  create_by   varchar(80) NOT NULL,
-  name        varchar(80) NOT NULL,
-  type        char DEFAULT 'E' NOT NULL,
-  description text,
-  private     smallint DEFAULT 0 NOT NULL,
-  status      smallint DEFAULT 1 NOT NULL,
-  reminded    int
-);
-create index idxStartTime on mrbs_entry(start_time);
-create index idxEndTime on mrbs_entry(end_time);
-
-CREATE TABLE mrbs_repeat
-(
-  id          serial primary key,
-  start_time  int DEFAULT 0 NOT NULL,
-  end_time    int DEFAULT 0 NOT NULL,
-  rep_type    int DEFAULT 0 NOT NULL,
-  end_date    int DEFAULT 0 NOT NULL,
-  rep_opt     varchar(32) NOT NULL,
-  room_id     int DEFAULT 1 NOT NULL,
-  timestamp   timestamp DEFAULT current_timestamp,
-  create_by   varchar(80) NOT NULL,
-  name        varchar(80) NOT NULL,
-  type        char DEFAULT 'E' NOT NULL,
-  description text,
-  rep_num_weeks smallint DEFAULT 0 NULL,
-  private     smallint DEFAULT 0 NOT NULL,
-  reminded    int
-);
-
-CREATE TABLE mrbs_variables
-(
-  id               serial primary key,
-  variable_name    varchar(80),
-  variable_content text
-);
-
-CREATE TABLE mrbs_users
-(
-  /* The first four fields are required. Don't remove. */
-  id        serial primary key,
-  level     smallint DEFAULT '0' NOT NULL,  /* play safe and give no rights */
-  name      varchar(30),
-  password  varchar(40),
-  email     varchar(75)
-);
-
-INSERT INTO mrbs_variables (variable_name, variable_content)
-  VALUES ('db_version', '12');
-INSERT INTO mrbs_variables (variable_name, variable_content)
-  VALUES ('local_db_version', '1');

Copied: mrbs/trunk/tables.pg.pre73.sql (from rev 1329, mrbs/trunk/tables.pg.sql)
===================================================================
--- mrbs/trunk/tables.pg.pre73.sql                              (rev 0)
+++ mrbs/trunk/tables.pg.pre73.sql      2010-04-20 21:38:16 UTC (rev 1332)
@@ -0,0 +1,115 @@
+-- $Id$
+--
+-- MRBS table creation script - for PostgreSQL
+--
+-- Notes:
+-- MySQL inserts the current date/time into any timestamp field which is not
+-- specified on insert. To get the same effect, use PostgreSQL default
+-- value current_timestamp.
+--
+-- If you have decided to change the prefix of your tables from 'mrbs_'
+-- to something else using $db_tbl_prefix then you must edit each
+-- 'CREATE TABLE', 'create index' and 'INSERT INTO' line below to replace
+-- 'mrbs_' with your new table prefix.
+--
+-- If you change the varchar lengths here, then you should check
+-- to see whether a corresponding length has been defined in the config file
+-- in the array $maxlength.
+
+CREATE TABLE mrbs_area
+(
+  id                     serial primary key,
+  area_name              varchar(30),
+  area_admin_email       text,
+  resolution             int,
+  default_duration       int,
+  morningstarts          int,
+  morningstarts_minutes  int,
+  eveningends            int,
+  eveningends_minutes    int,
+  private_enabled        smallint,
+  private_default        smallint,
+  private_mandatory      smallint,
+  private_override       varchar(32),
+  min_book_ahead_enabled smallint,
+  min_book_ahead_secs    int,
+  max_book_ahead_enabled smallint,
+  max_book_ahead_secs    int,
+  custom_html            text,
+  provisional_enabled    smallint,
+  reminders_enabled      smallint
+);
+
+CREATE TABLE mrbs_room
+(
+  id                serial primary key,
+  area_id           int DEFAULT 0 NOT NULL,
+  room_name         varchar(25) DEFAULT '' NOT NULL,
+  sort_key          varchar(25) DEFAULT '' NOT NULL,
+  description       varchar(60),
+  capacity          int DEFAULT 0 NOT NULL,
+  room_admin_email  text,
+  custom_html       text
+);
+create index idxSortKey on mrbs_room(sort_key);
+
+CREATE TABLE mrbs_entry
+(
+  id          serial primary key,
+  start_time  int DEFAULT 0 NOT NULL,
+  end_time    int DEFAULT 0 NOT NULL,
+  entry_type  int DEFAULT 0 NOT NULL,
+  repeat_id   int DEFAULT 0 NOT NULL,
+  room_id     int DEFAULT 1 NOT NULL,
+  timestamp   timestamp DEFAULT current_timestamp,
+  create_by   varchar(80) DEFAULT '' NOT NULL,
+  name        varchar(80) DEFAULT '' NOT NULL,
+  type        char DEFAULT 'E' NOT NULL,
+  description text,
+  private     smallint DEFAULT 0 NOT NULL,
+  status      smallint DEFAULT 1 NOT NULL,
+  reminded    int
+);
+create index idxStartTime on mrbs_entry(start_time);
+create index idxEndTime on mrbs_entry(end_time);
+
+CREATE TABLE mrbs_repeat
+(
+  id          serial primary key,
+  start_time  int DEFAULT 0 NOT NULL,
+  end_time    int DEFAULT 0 NOT NULL,
+  rep_type    int DEFAULT 0 NOT NULL,
+  end_date    int DEFAULT 0 NOT NULL,
+  rep_opt     varchar(32) DEFAULT '' NOT NULL,
+  room_id     int DEFAULT 1 NOT NULL,
+  timestamp   timestamp DEFAULT current_timestamp,
+  create_by   varchar(80) DEFAULT '' NOT NULL,
+  name        varchar(80) DEFAULT '' NOT NULL,
+  type        char DEFAULT 'E' NOT NULL,
+  description text,
+  rep_num_weeks smallint DEFAULT NULL NULL,
+  private     smallint DEFAULT 0 NOT NULL,
+  reminded    int
+);
+
+CREATE TABLE mrbs_variables
+(
+  id               serial primary key,
+  variable_name    varchar(80),
+  variable_content text
+);
+
+CREATE TABLE mrbs_users
+(
+  /* The first four fields are required. Don't remove. */
+  id        serial primary key,
+  level     smallint DEFAULT '0' NOT NULL,  /* play safe and give no rights */
+  name      varchar(30),
+  password  varchar(40),
+  email     varchar(75)
+);
+
+INSERT INTO mrbs_variables (variable_name, variable_content)
+  VALUES ('db_version', '12');
+INSERT INTO mrbs_variables (variable_name, variable_content)
+  VALUES ('local_db_version', '1');

Deleted: mrbs/trunk/tables.pg.sql
===================================================================
--- mrbs/trunk/tables.pg.sql    2010-04-20 20:16:35 UTC (rev 1331)
+++ mrbs/trunk/tables.pg.sql    2010-04-20 21:38:16 UTC (rev 1332)
@@ -1,115 +0,0 @@
--- $Id$
---
--- MRBS table creation script - for PostgreSQL
---
--- Notes:
--- MySQL inserts the current date/time into any timestamp field which is not
--- specified on insert. To get the same effect, use PostgreSQL default
--- value current_timestamp.
---
--- If you have decided to change the prefix of your tables from 'mrbs_'
--- to something else using $db_tbl_prefix then you must edit each
--- 'CREATE TABLE', 'create index' and 'INSERT INTO' line below to replace
--- 'mrbs_' with your new table prefix.
---
--- If you change the varchar lengths here, then you should check
--- to see whether a corresponding length has been defined in the config file
--- in the array $maxlength.
-
-CREATE TABLE mrbs_area
-(
-  id                     serial primary key,
-  area_name              varchar(30),
-  area_admin_email       text,
-  resolution             int,
-  default_duration       int,
-  morningstarts          int,
-  morningstarts_minutes  int,
-  eveningends            int,
-  eveningends_minutes    int,
-  private_enabled        smallint,
-  private_default        smallint,
-  private_mandatory      smallint,
-  private_override       varchar(32),
-  min_book_ahead_enabled smallint,
-  min_book_ahead_secs    int,
-  max_book_ahead_enabled smallint,
-  max_book_ahead_secs    int,
-  custom_html            text,
-  provisional_enabled    smallint,
-  reminders_enabled      smallint
-);
-
-CREATE TABLE mrbs_room
-(
-  id                serial primary key,
-  area_id           int DEFAULT 0 NOT NULL,
-  room_name         varchar(25) DEFAULT '' NOT NULL,
-  sort_key          varchar(25) DEFAULT '' NOT NULL,
-  description       varchar(60),
-  capacity          int DEFAULT 0 NOT NULL,
-  room_admin_email  text,
-  custom_html       text
-);
-create index idxSortKey on mrbs_room(sort_key);
-
-CREATE TABLE mrbs_entry
-(
-  id          serial primary key,
-  start_time  int DEFAULT 0 NOT NULL,
-  end_time    int DEFAULT 0 NOT NULL,
-  entry_type  int DEFAULT 0 NOT NULL,
-  repeat_id   int DEFAULT 0 NOT NULL,
-  room_id     int DEFAULT 1 NOT NULL,
-  timestamp   timestamp DEFAULT current_timestamp,
-  create_by   varchar(80) DEFAULT '' NOT NULL,
-  name        varchar(80) DEFAULT '' NOT NULL,
-  type        char DEFAULT 'E' NOT NULL,
-  description text,
-  private     smallint DEFAULT 0 NOT NULL,
-  status      smallint DEFAULT 1 NOT NULL,
-  reminded    int
-);
-create index idxStartTime on mrbs_entry(start_time);
-create index idxEndTime on mrbs_entry(end_time);
-
-CREATE TABLE mrbs_repeat
-(
-  id          serial primary key,
-  start_time  int DEFAULT 0 NOT NULL,
-  end_time    int DEFAULT 0 NOT NULL,
-  rep_type    int DEFAULT 0 NOT NULL,
-  end_date    int DEFAULT 0 NOT NULL,
-  rep_opt     varchar(32) DEFAULT '' NOT NULL,
-  room_id     int DEFAULT 1 NOT NULL,
-  timestamp   timestamp DEFAULT current_timestamp,
-  create_by   varchar(80) DEFAULT '' NOT NULL,
-  name        varchar(80) DEFAULT '' NOT NULL,
-  type        char DEFAULT 'E' NOT NULL,
-  description text,
-  rep_num_weeks smallint DEFAULT NULL NULL,
-  private     smallint DEFAULT 0 NOT NULL,
-  reminded    int
-);
-
-CREATE TABLE mrbs_variables
-(
-  id               serial primary key,
-  variable_name    varchar(80),
-  variable_content text
-);
-
-CREATE TABLE mrbs_users
-(
-  /* The first four fields are required. Don't remove. */
-  id        serial primary key,
-  level     smallint DEFAULT '0' NOT NULL,  /* play safe and give no rights */
-  name      varchar(30),
-  password  varchar(40),
-  email     varchar(75)
-);
-
-INSERT INTO mrbs_variables (variable_name, variable_content)
-  VALUES ('db_version', '12');
-INSERT INTO mrbs_variables (variable_name, variable_content)
-  VALUES ('local_db_version', '1');

Copied: mrbs/trunk/tables.pg.sql (from rev 1329, 
mrbs/trunk/tables.pg.73and_above.sql)
===================================================================
--- mrbs/trunk/tables.pg.sql                            (rev 0)
+++ mrbs/trunk/tables.pg.sql    2010-04-20 21:38:16 UTC (rev 1332)
@@ -0,0 +1,127 @@
+-- $Id$
+--
+-- MRBS table creation script - for PostgreSQL 7.3 and above
+--
+-- Notes:
+-- MySQL inserts the current date/time into any timestamp field which is not
+-- specified on insert. To get the same effect, use PostgreSQL default
+-- value current_timestamp.
+-- This script is EXPERIMENTAL. PostGreSQL folks have changed some features 
+-- with 7.3 version which breaks many application, including mrbs :
+-- - An empty string ('') is no longer allowed as the input into an
+--   integer field. Formerly, it was silently interpreted as 0. If you want 
+--   a field to be 0 then explicitly use 0, if you want it to be undefined 
+--   then use NULL.
+-- - "INSERT" statements with column lists must specify all values;
+--   e.g., INSERT INTO tab (col1, col2) VALUES ('val1') is now invalid
+-- This tables creation script now works with 7.3, but the second issue above
+-- is already there, so currently mrbs does NOT work with pgsql 7.3 and above
+-- (thierry_bo 2003-12-03)
+--
+-- If you have decided to change the prefix of your tables from 'mrbs_'
+-- to something else using $db_tbl_prefix then you must edit each
+-- 'CREATE TABLE', 'create index' and 'INSERT INTO' line below to replace
+-- 'mrbs_' with your new table prefix.
+--
+-- If you change the varchar lengths here, then you should check
+-- to see whether a corresponding length has been defined in the config file
+-- in the array $maxlength.
+
+
+CREATE TABLE mrbs_area
+(
+  id                     serial primary key,
+  area_name              varchar(30),
+  area_admin_email       text,
+  resolution             int,
+  default_duration       int,
+  morningstarts          int,
+  morningstarts_minutes  int,
+  eveningends            int,
+  eveningends_minutes    int,
+  private_enabled        smallint,
+  private_default        smallint,
+  private_mandatory      smallint,
+  private_override       varchar(32),
+  min_book_ahead_enabled smallint,
+  min_book_ahead_secs    int,
+  max_book_ahead_enabled smallint,
+  max_book_ahead_secs    int,
+  custom_html            text,
+  provisional_enabled    smallint,
+  reminders_enabled      smallint
+);
+
+CREATE TABLE mrbs_room
+(
+  id                serial primary key,
+  area_id           int DEFAULT 0 NOT NULL,
+  room_name         varchar(25) NOT NULL,
+  sort_key          varchar(25) NOT NULL,
+  description       varchar(60),
+  capacity          int DEFAULT 0 NOT NULL,
+  room_admin_email  text,
+  custom_html       text
+);
+create index idxSortKey on mrbs_room(sort_key);
+
+CREATE TABLE mrbs_entry
+(
+  id          serial primary key,
+  start_time  int DEFAULT 0 NOT NULL,
+  end_time    int DEFAULT 0 NOT NULL,
+  entry_type  int DEFAULT 0 NOT NULL,
+  repeat_id   int DEFAULT 0 NOT NULL,
+  room_id     int DEFAULT 1 NOT NULL,
+  timestamp   timestamp DEFAULT current_timestamp,
+  create_by   varchar(80) NOT NULL,
+  name        varchar(80) NOT NULL,
+  type        char DEFAULT 'E' NOT NULL,
+  description text,
+  private     smallint DEFAULT 0 NOT NULL,
+  status      smallint DEFAULT 1 NOT NULL,
+  reminded    int
+);
+create index idxStartTime on mrbs_entry(start_time);
+create index idxEndTime on mrbs_entry(end_time);
+
+CREATE TABLE mrbs_repeat
+(
+  id          serial primary key,
+  start_time  int DEFAULT 0 NOT NULL,
+  end_time    int DEFAULT 0 NOT NULL,
+  rep_type    int DEFAULT 0 NOT NULL,
+  end_date    int DEFAULT 0 NOT NULL,
+  rep_opt     varchar(32) NOT NULL,
+  room_id     int DEFAULT 1 NOT NULL,
+  timestamp   timestamp DEFAULT current_timestamp,
+  create_by   varchar(80) NOT NULL,
+  name        varchar(80) NOT NULL,
+  type        char DEFAULT 'E' NOT NULL,
+  description text,
+  rep_num_weeks smallint DEFAULT 0 NULL,
+  private     smallint DEFAULT 0 NOT NULL,
+  reminded    int
+);
+
+CREATE TABLE mrbs_variables
+(
+  id               serial primary key,
+  variable_name    varchar(80),
+  variable_content text
+);
+
+CREATE TABLE mrbs_users
+(
+  /* The first four fields are required. Don't remove. */
+  id        serial primary key,
+  level     smallint DEFAULT '0' NOT NULL,  /* play safe and give no rights */
+  name      varchar(30),
+  password  varchar(40),
+  email     varchar(75)
+);
+
+INSERT INTO mrbs_variables (variable_name, variable_content)
+  VALUES ('db_version', '12');
+INSERT INTO mrbs_variables (variable_name, variable_content)
+  VALUES ('local_db_version', '1');

Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php       2010-04-20 20:16:35 UTC (rev 
1331)
+++ mrbs/trunk/web/systemdefaults.inc.php       2010-04-20 21:38:16 UTC (rev 
1332)
@@ -116,13 +116,17 @@
  * Calendar settings
  *******************/
 
-// Note: Be careful to avoid specify options that displays blocks overlaping
-// the next day, since it is not properly handled.
+// This setting controls whether to use "clock" or "times" based intervals
+// (FALSE and the default) or user defined periods (TRUE).   "Times" based
+// bookings allow you to define regular consecutive booking slots, eg every
+// half an hour from 7.00 am to 7.00 pm.   "Periods" based bookings are useful
+// in, for example, schools where the booking slots are of different lengths
+// and are not consecutive because of change-over time or breaks.
 
-// This setting controls whether to use "clock" based intervals (FALSE and
-// the default) or user defined periods (TRUE).  If user-defined periods
-// are used then $resolution, $morningstarts, $eveningends,
-// $eveningends_minutes and $twentyfourhour_format are ignored.
+// It is not possible to swap between these two options once bookings have
+// been created and to have meaningful entries.  This is due to differences
+// in the way that the data is stored.
+
 $enable_periods = FALSE;
 
 
@@ -134,6 +138,9 @@
 
 // The "Times" settings are ignored if $enable_periods is TRUE.
 
+// Note: Be careful to avoid specifying options that display blocks overlapping
+// the next day, since it is not properly handled.
+
 // Resolution - what blocks can be booked, in seconds.
 // Default is half an hour: 1800 seconds.
 $resolution = (30 * 60);  // DEFAULT VALUE FOR NEW AREAS


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

------------------------------------------------------------------------------
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to