We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 07cdfb38 authored by elleo's avatar elleo

Keep track of the gobbler version a configuration was created with, so we can...

Keep track of the gobbler version a configuration was created with, so we can instruct the user to reinstall (or run an upgrade script in the future) if there's been an incompatible configuration or database change.
parent d87d3e38
<?php
require_once('database.php');
require_once('version.php');
if (!isset($config_version) || $config_version != $version) {
die("Configuration file is out of date. Please delete it (and associated database) and <a href='install.php'>reinstall</a>."); //TODO: Upgrade script for release versions
}
require_once('submissions-handshake.php');
?>
<?
require_once('MDB2.php');
require_once('version.php');
if(file_exists("config.php")) {
die("A configuration file already exists. Please delete <i>config.php</i> if you wish to reinstall.");
......@@ -48,7 +49,7 @@ if (isset($_POST['install'])) {
$submissions_server = $_POST['submissions'];
//Write out the configuration
$config = "<? \$connect_string = '" . $connect_string . "';\n \$submissions_server = '" . $submissions_server . "'; ?>";
$config = "<? \$config_version = " . $version .";\n \$connect_string = '" . $connect_string . "';\n \$submissions_server = '" . $submissions_server . "'; ?>";
$conf_file = fopen("config.php", "w");
$result = fwrite($conf_file, $config);
......
<?
$version = 0.1;
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment