JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
add db_upgrade system
[wfpl-cms.git] / config.php
index e60cbd7..59b1c98 100644 (file)
@@ -29,3 +29,9 @@ require_once(DOCROOT . 'inc/misc.php');
 
 # Connect to the database
 db_connect(WFPL_DB, WFPL_DB_USER, WFPL_DB_PASS);
+
+# upgrade db (only) on special trigger (assures only one upgrade at a time)
+if (isset($_SERVER['HTTP_X_UPGRADE_DB_NOW'])) {
+       require_once(DOCROOT . 'inc/db_upgrade.php');
+       db_upgrade();
+}