Revision: 1569
          http://mrbs.svn.sourceforge.net/mrbs/?rev=1569&view=rev
Author:   cimorrison
Date:     2010-11-02 14:39:39 +0000 (Tue, 02 Nov 2010)

Log Message:
-----------
Added a check to see whether $provisional_enabled (which has now been renamed) 
is still used in the config file

Modified Paths:
--------------
    mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
    mrbs/branches/provisional_bookings_new_style/web/upgrade/21/post.inc

Modified: mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php       
2010-11-02 12:25:37 UTC (rev 1568)
+++ mrbs/branches/provisional_bookings_new_style/web/mrbs.css.php       
2010-11-02 14:39:39 UTC (rev 1569)
@@ -28,7 +28,9 @@
 
 .current {color: <?php echo $highlight_font_color ?>}                        
/* used to highlight the current item */
 .error   {color: <?php echo $highlight_font_color ?>; font-weight: bold}     
/* for error messages */
+.warning {color: <?php echo $highlight_font_color ?>}                        
/* for warning messages */
 
+
 h1 {font-size: x-large}
 h2 {font-size: large}
 

Modified: mrbs/branches/provisional_bookings_new_style/web/upgrade/21/post.inc
===================================================================
--- mrbs/branches/provisional_bookings_new_style/web/upgrade/21/post.inc        
2010-11-02 12:25:37 UTC (rev 1568)
+++ mrbs/branches/provisional_bookings_new_style/web/upgrade/21/post.inc        
2010-11-02 14:39:39 UTC (rev 1569)
@@ -8,7 +8,41 @@
 require_once "standard_vars.inc.php";  // won't have been included yet and we 
need it for $area_defaults
 
 global $tbl_area, $area_defaults, $boolean_fields;
+global $provisional_enabled, $approval_enabled;
 
+// $provisional_enabled has now been renamed $approval_enabled, to avoid 
confusion with
+// tentative bookings.   If $provisional_enabled is still being used in the 
config file
+// then we need to warn them.   Furthermore, if $provisional_enabled is TRUE 
and 
+// $approval_enabled is still FALSE, ie the system default, then we assume 
that they really
+// meant to set $approval_enabled to TRUE and we will use that.   Otherwise 
they will find
+// that areas that have still got the field set to NULL will have approval 
disabled when
+// previously it was enabled.
+if (isset($provisional_enabled))
+{
+  echo "<p class=\"warning\">";
+  echo 'Warning:  you are still using <code>$provisional_enabled</code> in 
your config file.
+        This has now been replaced by <code>$approval_enabled</code>.   Please 
';
+  if ($area_defaults['approval_enabled'])
+  {
+    // As they have changed the default setting they must already have 
$approval_enabled
+    // in their config file, so they just need to delete the old variable
+    echo 'delete <code>$provisional_enabled</code> from your config file';
+  }
+  else
+  {
+    // otherwise they should rename it
+    echo 'rename <code>$provisional_enabled</code> to 
<code>$approval_enabled</code>';
+  }
+  echo ' once this upgrade is complete.';
+  if (!$area_defaults['approval_enabled']  && $provisional_enabled)
+  {
+    echo '<p class="warning">As you have <code>$provisional_enabled = 
TRUE;</code> MRBS is assuming that
+          <code>$approval_enabled = TRUE;</code> as the default setting during 
this upgrade.</p>';
+    $area_defaults['approval_enabled'] = TRUE;
+  }
+  echo "</p>\n";
+}
+
 $fields = sql_field_info($tbl_area);
 foreach ($fields as $field)
 {


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

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to