diff --git a/install/index.php b/install/index.php
index 03c1cb1ea..685c71392 100644
--- a/install/index.php
+++ b/install/index.php
@@ -63,17 +63,44 @@
function tryDbConnect()
{
- global $settings, $db_database;
+ global $settings, $db_database, $db_connection, $debugInstaller;
if (!isset($settings['db_type']) || !isset($_SESSION['db_host']) || !isset($_SESSION['db_login']) || !isset($_SESSION['db_database'])) {
return false;
}
try {
- // Don't require database to exist in mysqli
+ // Don't require database to exist in mysqli and postgres
if ($_SESSION['db_type'] == 'mysqli') {
$mysqli = new mysqli($_SESSION['db_host'], $_SESSION['db_login'], $_SESSION['db_password']);
if ($mysqli->connect_error) {
return false;
}
+ $db_connection = $mysqli;
+ return true;
+ } else if ( $_SESSION['db_type'] == 'postgresql') {
+ try {
+ $connString = "host=" . $_SESSION['db_host'] . " dbname=" . $_SESSION['db_database'] . " user=" . $_SESSION['db_login']
+ . " password=" . $_SESSION['db_password'];
+ $c = @pg_connect($connString);
+ if ($c) {
+ $db_connection = $c;
+ if ($debugInstaller)
+ echo "Successful Postgres connection to " . $_SESSION['db_database'] . "
";
+ return true;
+ } else {
+ if ($debugInstaller)
+ echo "First Postgres connection to " . $_SESSION['db_database'] . " FAILED
";
+ }
+ } catch (Exception $e) {
+ // We may have failed because the db has not been created yet. So try again with the 'postgres' database.
+ if(!$debugInstaller) {
+ echo "First db connect attempt failed. Trying postgres db instead.
";
+ }
+ }
+ $connString = "host=" . $_SESSION['db_host'] . " dbname=postgres user=" . $_SESSION['db_login'] . " password=" . $_SESSION['db_password'];
+ $c = @pg_connect($connString);
+ if (!$c) {
+ return false;
+ }
return true;
} else {
$c = @dbi_connect(
@@ -87,6 +114,9 @@ function tryDbConnect()
} catch (Exception $e) {
return false;
}
+ if ($c) {
+ $db_connection = $c;
+ }
return !empty($c);
}
@@ -261,17 +291,23 @@ function_exists('gd_info'),
phpinfo ();
exit;
}
-$emptyDatabase = $canConnectDb ? isEmptyDatabase() : true;
+$databaseExists = false;
+$emptyDatabase = false;
+try {
+ // Try checking if there is a webcal_config table. If there is, then the db exists.
+ $emptyDatabase = isEmptyDatabase();
+ } catch (Exception $e) {
+ // If we get an exception, then the db does not exist.
+ }
$unsavedDbSettings = !empty($_SESSION['unsavedDbSettings']); // Keep track if Db settings were modified by not yet saved
$reportedDbVersion = 'Unknown';
$adminUserCount = 0;
-$databaseExists = false;
$databaseCurrent = false;
$settingsSaved = true; // True if a valid settings.php found unless user changes settings
$detectedDbVersion = 'Unknown';
if ($canConnectDb && !empty($db_connection)) {
$reportedDbVersion = getDbVersion();
- $detectedDbVersion = getDatabaseVersionFromSchema();
+ $detectedDbVersion = getDatabaseVersionFromSchema(!$debugInstaller);
if ($debugInstaller) {
//echo "Db Version: $dbV
";
}
diff --git a/install/install_ajax.php b/install/install_ajax.php
index 24ca2eadc..51ace2f87 100644
--- a/install/install_ajax.php
+++ b/install/install_ajax.php
@@ -31,10 +31,15 @@ function testDbConnection($host, $login, $password, $database)
$ret = true;
$c->close();
} elseif ($_POST['dbType'] == 'postgresql') {
- $c = pg_connect("host=$host dbname=$database user=$login password=$password");
+ $c = @pg_connect("host=$host dbname=$database user=$login password=$password");
$ret = ($c !== false);
- $error_msg = pg_last_error($c);
- pg_close($c);
+ if (!$ret) {
+ $c = @pg_connect("host=$host dbname=postgres user=$login password=$password");
+ $ret = ($c !== false);
+ }
+ if ($c) {
+ pg_close($c);
+ }
} elseif ($_POST['dbType'] == 'ibase') {
$c = ibase_connect($database, $login, $password);
$ret = ($c !== false);
diff --git a/install/install_createdb.php b/install/install_createdb.php
index d42c9a77b..24b7e1dff 100644
--- a/install/install_createdb.php
+++ b/install/install_createdb.php
@@ -16,9 +16,9 @@
+if ($databaseExists) {
+ printNextPageButton($action);
+} else {
+ printSubmitButton($action, null, translate('Create Database'));
+}
+?>
\ No newline at end of file
diff --git a/install/install_createdb_handler.php b/install/install_createdb_handler.php
index 9adfe11eb..4490f1ac0 100644
--- a/install/install_createdb_handler.php
+++ b/install/install_createdb_handler.php
@@ -1,9 +1,12 @@
query($sql) === TRUE) {
$conn->close();
+ $existsMessage = str_replace("XXX", $databaseName, $existsMessage);
+ $_SESSION['alert'] = $existsMessage;
return true;
} else {
throw new Exception("Error creating database: " . $conn->error);
@@ -31,6 +36,7 @@ function createSqliteDatabase(string $filename): bool
$db->exec("DROP TABLE dummy");
$db->close();
return true;
+ // TODO: Implement this...
} catch (Exception $e) {
throw new Exception("Error creating SQLite3 database: " . $e->getMessage());
}
@@ -38,17 +44,34 @@ function createSqliteDatabase(string $filename): bool
function createPostgresqlDatabase($hostname, $login, $password, $databaseName): bool
{
- $connString = "host={$hostname} user={$login} password={$password}";
+ global $existsMessage, $createdMessage;
+ // Use specific query for existing database check (dbname=postgres)
+ $connString = "host={$hostname} dbname=postgres user={$login} password={$password}";
$db = pg_connect($connString);
if (!$db) {
- throw new Exception("Connection failed: " . pg_last_error());
+ throw new Exception("Connection failed");
+ }
+ $existsQuery = "SELECT 1 FROM information_schema.schemata WHERE schema_name = $1";
+ $result = pg_query_params($db, $existsQuery, [$databaseName]);
+ if ($result) {
+ $row = pg_fetch_row($result);
+ if ($row && $row[0] === '1') {
+ // Database exists
+ pg_close($db);
+ $existsMessage = str_replace("XXX", $databaseName, $existsMessage);
+ $_SESSION['alert'] = $existsMessage;
+ return false;
+ } else {
+ // Database doesn't exist
+ }
}
-
$result = pg_query($db, "CREATE DATABASE {$databaseName}");
if (!$result) {
throw new Exception("Error creating database: " . pg_last_error($db));
}
pg_close($db);
+ $createdMessage = str_replace("XXX", $databaseName, $createdMessage);
+ $_SESSION['alert'] = $createdMessage;
return true;
}
diff --git a/install/install_functions.php b/install/install_functions.php
index 626deb07c..a2e2c5abe 100644
--- a/install/install_functions.php
+++ b/install/install_functions.php
@@ -17,6 +17,9 @@ function isEmptyDatabase()
{
global $db_connection, $debugInstaller;
if (empty($db_connection)) {
+ if ($debugInstaller) {
+ echo "No connection => empty db
";
+ }
return true;
}
try {
@@ -499,7 +502,7 @@ function getDatabaseVersionFromSchema($silent = true)
for ($i = 0; $i < count($database_upgrade_matrix); $i++) {
$sql = $database_upgrade_matrix[$i][0];
if (!$silent) {
- echo "SQL: $sql
\n";
+ echo "SQL: $sql
Success: " . ($success ? "true":"false") . "\n
";
}
if (empty($sql)) {
@@ -507,6 +510,9 @@ function getDatabaseVersionFromSchema($silent = true)
// We reached the end of database_upgrade_matrix[] with no errors, which
// means the database is structurally up-to-date.
$dbVersion = $PROGRAM_VERSION;
+ if (!$silent) {
+ echo "Complete success: version $dbVersion
\n";
+ }
}
} else {
try {
diff --git a/install/sql/tables-mysql.sql b/install/sql/tables-mysql.sql
index ee16eb722..c0bb7ebd1 100644
--- a/install/sql/tables-mysql.sql
+++ b/install/sql/tables-mysql.sql
@@ -280,7 +280,8 @@ CREATE TABLE webcal_site_extras (
/* how many minutes before event should a reminder be sent */
cal_remind INT DEFAULT 0,
/* used to store text data */
- cal_data TEXT
+ cal_data TEXT,
+ PRIMARY KEY (cal_id, cal_name)
);
/**
diff --git a/install/sql/tables-postgres.sql b/install/sql/tables-postgres.sql
index cf2ca4d1a..6cf5682a9 100644
--- a/install/sql/tables-postgres.sql
+++ b/install/sql/tables-postgres.sql
@@ -94,7 +94,8 @@ CREATE TABLE webcal_site_extras (
cal_type INT NOT NULL,
cal_date INT DEFAULT '0',
cal_remind INT DEFAULT '0',
- cal_data TEXT
+ cal_data TEXT,
+ PRIMARY KEY (cal_id, cal_name)
);
CREATE TABLE webcal_reminders (
cal_id INT DEFAULT '0' NOT NULL,
@@ -158,7 +159,7 @@ CREATE TABLE webcal_categories (
cat_status CHAR DEFAULT 'A',
cat_icon_mime VARCHAR(32) DEFAULT NULL,
cat_icon_blob BYTEA DEFAULT NULL,
- PRIMARY KEY ( cat_id, cat_order, cat_owner )
+ PRIMARY KEY ( cat_id, cat_owner )
);
CREATE TABLE webcal_asst (
cal_boss VARCHAR(25) NOT NULL,
@@ -184,8 +185,6 @@ CREATE TABLE webcal_import (
cal_md5 VARCHAR(32) NULL DEFAULT NULL,
PRIMARY KEY ( cal_import_id )
);
-CREATE INDEX webcal_import_data_type ON webcal_import_data(cal_import_type);
-CREATE INDEX webcal_import_data_ext_id ON webcal_import_data(cal_external_id);
CREATE TABLE webcal_import_data (
cal_import_id INT NOT NULL,
cal_id INT NOT NULL,
@@ -194,6 +193,8 @@ CREATE TABLE webcal_import_data (
cal_external_id VARCHAR(200) NULL,
PRIMARY KEY ( cal_id, cal_login )
);
+CREATE INDEX webcal_import_data_type ON webcal_import_data(cal_import_type);
+CREATE INDEX webcal_import_data_ext_id ON webcal_import_data(cal_external_id);
CREATE TABLE webcal_report (
cal_login VARCHAR(25) NOT NULL,
cal_report_id INT NOT NULL,
diff --git a/install/sql/upgrade-sql.php b/install/sql/upgrade-sql.php
index 057d53d53..6f52e8e2c 100644
--- a/install/sql/upgrade-sql.php
+++ b/install/sql/upgrade-sql.php
@@ -155,6 +155,14 @@ function getSqlUpdates($currentVersion, $dbType = 'default', $includeFunctions =
cal_date INT NOT NULL,
PRIMARY KEY (cal_id,cal_date)
);
+SQL,
+ 'posgresql-sql' => <<<'SQL'
+ALTER TABLE webcal_user ALTER COLUMN cal_passwd TYPE VARCHAR(32);
+CREATE TABLE webcal_entry_repeats_not (
+ cal_id INT NOT NULL,
+ cal_date INT NOT NULL,
+ PRIMARY KEY (cal_id,cal_date)
+);
SQL
],
[
@@ -167,7 +175,7 @@ function getSqlUpdates($currentVersion, $dbType = 'default', $includeFunctions =
cat_owner VARCHAR(25),
PRIMARY KEY (cat_id)
);
-SQL
+SQL,
],
[
'version' => 'v0.9.41',
@@ -263,6 +271,14 @@ function getSqlUpdates($currentVersion, $dbType = 'default', $includeFunctions =
],
[
'version' => 'v1.1.0a-CVS',
+ 'postresql-sql' => <<<'SQL'
+CREATE TABLE webcal_access_function (
+ cal_login VARCHAR(25) NOT NULL,
+ cal_permissions VARCHAR(64) NOT NULL,
+ PRIMARY KEY (cal_login)
+);
+ALTER TABLE webcal_nonuser_cals ALTER COLUMN cal_is_public SET TYPE CHAR(1) NOT NULL DEFAULT 'N';
+SQL,
'default-sql' => <<<'SQL'
CREATE TABLE webcal_access_function (
cal_login VARCHAR(25) NOT NULL,
@@ -274,6 +290,32 @@ function getSqlUpdates($currentVersion, $dbType = 'default', $includeFunctions =
],
[
'version' => 'v1.1.0b-CVS',
+ 'postgresql-sql' => <<<'SQL'
+CREATE TABLE webcal_user_template (
+ cal_login VARCHAR(25) NOT NULL,
+ cal_type CHAR(1) NOT NULL,
+ cal_template_text TEXT,
+ PRIMARY KEY (cal_login,cal_type)
+);
+ALTER TABLE webcal_entry_repeats ADD COLUMN cal_endtime INTEGER DEFAULT NULL;
+ALTER TABLE webcal_entry_repeats ADD COLUMN cal_bymonth VARCHAR(50) DEFAULT NULL;
+ALTER TABLE webcal_entry_repeats ADD COLUMN cal_bymonthday VARCHAR(100) DEFAULT NULL;
+ALTER TABLE webcal_entry_repeats ADD COLUMN cal_byday VARCHAR(100) DEFAULT NULL;
+ALTER TABLE webcal_entry_repeats ADD COLUMN cal_bysetpos VARCHAR(50) DEFAULT NULL;
+ALTER TABLE webcal_entry_repeats ADD COLUMN cal_byweekno VARCHAR(50) DEFAULT NULL;
+ALTER TABLE webcal_entry_repeats ADD COLUMN cal_byyearday VARCHAR(50) DEFAULT NULL;
+ALTER TABLE webcal_entry_repeats ADD COLUMN cal_wkst CHAR(2) DEFAULT 'MO';
+ALTER TABLE webcal_entry_repeats ADD COLUMN cal_count INTEGER DEFAULT NULL;
+ALTER TABLE webcal_entry_repeats_not ADD COLUMN cal_exdate BOOLEAN DEFAULT TRUE;
+ALTER TABLE webcal_entry ADD COLUMN cal_due_date INTEGER DEFAULT NULL;
+ALTER TABLE webcal_entry ADD COLUMN cal_due_time INTEGER DEFAULT NULL;
+ALTER TABLE webcal_entry ADD COLUMN cal_location VARCHAR(100) DEFAULT NULL;
+ALTER TABLE webcal_entry ADD COLUMN cal_url VARCHAR(100) DEFAULT NULL;
+ALTER TABLE webcal_entry ADD COLUMN cal_completed BOOLEAN DEFAULT NULL;
+ALTER TABLE webcal_entry_user ADD COLUMN cal_percent SMALLINT NOT NULL DEFAULT 0;
+ALTER TABLE webcal_site_extras DROP CONSTRAINT webcal_site_extras_pkey;
+ALTER TABLE webcal_site_extras ADD CONSTRAINT webcal_site_extras_pkey PRIMARY KEY (cal_id, cal_name);
+SQL,
'default-sql' => <<<'SQL'
CREATE TABLE webcal_user_template (
cal_login VARCHAR(25) NOT NULL,
@@ -298,17 +340,19 @@ function getSqlUpdates($currentVersion, $dbType = 'default', $includeFunctions =
ALTER TABLE webcal_entry ADD cal_completed INT(11) DEFAULT NULL;
ALTER TABLE webcal_entry_user ADD cal_percent INT(11) NOT NULL DEFAULT '0';
ALTER TABLE webcal_site_extras DROP PRIMARY KEY;
-SQL
+ALTER TABLE webcal_site_extras ADD PRIMARY KEY (cal_id, cal_name);
+SQL,
],
[
'version' => 'v1.1.0c-CVS',
'upgrade-function' => 'do_v11b_updates',
'default-sql' => <<<'SQL'
CREATE TABLE webcal_entry_categories (
- cal_id int(11) NOT NULL DEFAULT '0',
- cat_id int(11) NOT NULL DEFAULT '0',
- cat_order int(11) NOT NULL DEFAULT '0',
- cat_owner VARCHAR(25) DEFAULT NULL
+ cal_id INT NOT NULL DEFAULT 0,
+ cat_id INT NOT NULL DEFAULT 0,
+ cat_order INT NOT NULL DEFAULT 0,
+ cat_owner VARCHAR(25) DEFAULT NULL,
+ PRIMARY KEY ( cal_id, cat_id, cat_order, cat_owner )
);
SQL
],
@@ -385,12 +429,24 @@ function getSqlUpdates($currentVersion, $dbType = 'default', $includeFunctions =
],
[
'version' => 'v1.1.2',
+ 'postgresql-sql' => <<<'SQL'
+ALTER TABLE webcal_nonuser_cals ADD COLUMN cal_url VARCHAR(255) DEFAULT NULL;
+SQL,
'default-sql' => <<<'SQL'
ALTER TABLE webcal_nonuser_cals ADD cal_url VARCHAR(255) DEFAULT NULL;
SQL
],
[
'version' => 'v1.1.3',
+ 'postgresql-sql' => <<<'SQL'
+ALTER TABLE webcal_categories ADD COLUMN cat_color VARCHAR(8) DEFAULT NULL;
+ALTER TABLE webcal_user ADD COLUMN cal_enabled CHAR(1) DEFAULT 'Y';
+ALTER TABLE webcal_user ADD COLUMN cal_telephone VARCHAR(50) DEFAULT NULL;
+ALTER TABLE webcal_user ADD COLUMN cal_address VARCHAR(75) DEFAULT NULL;
+ALTER TABLE webcal_user ADD COLUMN cal_title VARCHAR(75) DEFAULT NULL;
+ALTER TABLE webcal_user ADD COLUMN cal_birthday INTEGER DEFAULT NULL;
+ALTER TABLE webcal_user ADD COLUMN cal_last_login INTEGER DEFAULT NULL;
+SQL,
'default-sql' => <<<'SQL'
ALTER TABLE webcal_categories ADD cat_color VARCHAR(8) DEFAULT NULL;
ALTER TABLE webcal_user ADD cal_enabled CHAR(1) DEFAULT 'Y';
@@ -421,16 +477,27 @@ function getSqlUpdates($currentVersion, $dbType = 'default', $includeFunctions =
],
[
'version' => 'v1.9.1',
+ 'postgresql-sql' => <<<'SQL'
+ ALTER TABLE webcal_import ADD COLUMN cal_check_date INTEGER DEFAULT NULL;
+ ALTER TABLE webcal_import ADD COLUMN cal_md5 VARCHAR(32) DEFAULT NULL;
+ CREATE INDEX webcal_import_data_type ON webcal_import_data(cal_import_type);
+ CREATE INDEX webcal_import_data_ext_id ON webcal_import_data(cal_external_id);
+ ALTER TABLE webcal_user ALTER COLUMN cal_passwd SET TYPE VARCHAR(255);
+ SQL,
'default-sql' => <<<'SQL'
-ALTER TABLE webcal_import ADD cal_check_date INT NULL;
-ALTER TABLE webcal_import ADD cal_md5 VARCHAR(32) NULL DEFAULT NULL;
-CREATE INDEX webcal_import_data_type ON webcal_import_data(cal_import_type);
-CREATE INDEX webcal_import_data_ext_id ON webcal_import_data(cal_external_id);
-ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
+ ALTER TABLE webcal_import ADD cal_check_date INT NULL;
+ ALTER TABLE webcal_import ADD cal_md5 VARCHAR(32) NULL DEFAULT NULL;
+ CREATE INDEX webcal_import_data_type ON webcal_import_data(cal_import_type);
+ CREATE INDEX webcal_import_data_ext_id ON webcal_import_data(cal_external_id);
+ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
SQL
],
[
'version' => 'v1.9.6',
+ 'postgresql-sql' => <<<'SQL'
+UPDATE webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
+ALTER TABLE webcal_entry_categories ADD CONSTRAINT pkey_webcal_entry_categories PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
+SQL,
'default-sql' => <<<'SQL'
UPDATE webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
@@ -445,15 +512,19 @@ function getSqlUpdates($currentVersion, $dbType = 'default', $includeFunctions =
ALTER TABLE webcal_categories ADD cat_icon_blob LONGBLOB DEFAULT NULL;
ALTER TABLE webcal_categories MODIFY cat_owner VARCHAR(25) DEFAULT '' NOT NULL;
SQL,
- 'postgres-sql' => <<<'SQL'
-ALTER TABLE webcal_categories ADD COLUMN cat_status CHAR DEFAULT 'A';
+ 'postgresql-sql' => <<<'SQL'
+ALTER TABLE webcal_categories ADD COLUMN cat_status CHAR(1) DEFAULT 'A';
ALTER TABLE webcal_categories ADD COLUMN cat_icon_mime VARCHAR(32) DEFAULT NULL;
ALTER TABLE webcal_categories ADD COLUMN cat_icon_blob BYTEA DEFAULT NULL;
-ALTER TABLE webcal_categories MODIFY cat_owner VARCHAR(25) DEFAULT '' NOT NULL;
+ALTER TABLE webcal_categories ALTER COLUMN cat_owner TYPE VARCHAR(25);
SQL
],
[
'version' => 'v1.9.12',
+ 'postgres-sql' => <<<'SQL'
+ALTER TABLE webcal_nonuser_cals ALTER COLUMN cal_url TYPE VARCHAR(255);
+ALTER TABLE webcal_entry ALTER COLUMN cal_url TYPE VARCHAR(255);
+SQL,
'default-sql' => <<<'SQL'
ALTER TABLE webcal_nonuser_cals MODIFY COLUMN cal_url VARCHAR(255);
ALTER TABLE webcal_entry MODIFY COLUMN cal_url VARCHAR(255);
diff --git a/install/sql/upgrade_matrix.php b/install/sql/upgrade_matrix.php
index 221c9869e..0f9377723 100644
--- a/install/sql/upgrade_matrix.php
+++ b/install/sql/upgrade_matrix.php
@@ -12,57 +12,57 @@
// WebCalendar version right in the database. This is kludge to deal with installations from
// before then.
$database_upgrade_matrix = [
- ['INSERT INTO webcal_view ( cal_name, cal_view_id, cal_is_global, cal_owner ) VALUES ( "delete-me", -999, "Z", "nobody" )',
- 'DELETE FROM webcal_view WHERE cal_view_id = -999',
- 'v0.9.43', 'upgrade_v1.0RC3'],
- ['INSERT INTO webcal_access_function ( cal_login, cal_permissions ) VALUES ( "zzz","zzz" )',
- 'DELETE FROM webcal_access_function WHERE cal_login = "zzz"',
- 'v1.0RC3', 'upgrade_v1.1.0-CVS'],
- ['INSERT INTO webcal_user_template ( cal_login, cal_type ) VALUES ( "zzz", "Z" )',
- 'DELETE FROM webcal_user_template WHERE cal_login = "zzz"',
- 'v1.1.0-CVS', 'upgrade_v1.1.0a-CVS'],
- ['INSERT INTO webcal_entry_categories ( cal_id, cat_owner ) VALUES ( -999, "nobody" )',
- 'DELETE FROM webcal_entry_categories WHERE cal_id = -999',
- 'v1.1.0a-CVS', 'upgrade_v1.1.0b-CVS'],
- ['INSERT INTO webcal_blob ( cal_blob_id, cal_type, cal_mod_date, cal_mod_time ) VALUES ( -999, "Z", 20200101, 0 )',
- 'DELETE FROM webcal_blob WHERE cal_blob_id = -999',
- 'v1.1.0b-CVS', 'upgrade_v1.1.0c-CVS'],
- ['INSERT INTO webcal_access_user ( cal_login, cal_other_user ) VALUES ( "zzz", "zzz" )',
- 'DELETE FROM webcal_access_user WHERE cal_login = "zzz"',
- 'v1.1.0c-CVS', 'upgrade_v1.1.0d-CVS'],
- ['INSERT INTO webcal_reminders ( cal_id ) VALUES ( -999 )',
- 'DELETE FROM webcal_reminders WHERE cal_id = -999',
- 'v1.1.0d-CVS', 'upgrade_v1.1.0e-CVS'],
- ['INSERT INTO webcal_nonuser_cals ( cal_login, cal_admin, cal_url ) VALUES ( "zzz", "zzz", "zzz" )',
- 'DELETE FROM webcal_nonuser_cals WHERE cal_login = "zzz"',
- 'v1.1.0e-CVS', 'upgrade_v1.1.1'],
- ['INSERT INTO webcal_categories ( cat_id, cat_name, cat_color, cat_owner ) VALUES ( "999", "zzz", "#FFFFFF", "nobody" )',
- 'DELETE FROM webcal_categories WHERE cat_id = 999',
- 'v1.1.1', 'upgrade_v1.1.2'],
+ ["INSERT INTO webcal_view ( cal_name, cal_view_id, cal_is_global, cal_owner ) VALUES ( 'delete-me', -999, 'Z', 'nobody' )",
+ "DELETE FROM webcal_view WHERE cal_view_id = -999",
+ "v0.9.43", "upgrade_v1.0RC3"],
+ ["INSERT INTO webcal_access_function ( cal_login, cal_permissions ) VALUES ( 'zzz','zzz' )",
+ "DELETE FROM webcal_access_function WHERE cal_login = 'zzz'",
+ "v1.0RC3", "upgrade_v1.1.0-CVS"],
+ ["INSERT INTO webcal_user_template ( cal_login, cal_type ) VALUES ( 'zzz', 'Z' )",
+ "DELETE FROM webcal_user_template WHERE cal_login = 'zzz'",
+ "v1.1.0-CVS", "upgrade_v1.1.0a-CVS"],
+ ["INSERT INTO webcal_entry_categories ( cal_id, cat_owner ) VALUES ( -999, 'nobody' )",
+ "DELETE FROM webcal_entry_categories WHERE cal_id = -999",
+ "v1.1.0a-CVS", "upgrade_v1.1.0b-CVS"],
+ ["INSERT INTO webcal_blob ( cal_blob_id, cal_type, cal_mod_date, cal_mod_time ) VALUES ( -999, 'Z', 20200101, 0 )",
+ "DELETE FROM webcal_blob WHERE cal_blob_id = -999",
+ "v1.1.0b-CVS", "upgrade_v1.1.0c-CVS"],
+ ["INSERT INTO webcal_access_user ( cal_login, cal_other_user ) VALUES ( 'zzz', 'zzz' )",
+ "DELETE FROM webcal_access_user WHERE cal_login = 'zzz'",
+ "v1.1.0c-CVS", "upgrade_v1.1.0d-CVS"],
+ ["INSERT INTO webcal_reminders ( cal_id ) VALUES ( -999 )",
+ "DELETE FROM webcal_reminders WHERE cal_id = -999",
+ "v1.1.0d-CVS", "upgrade_v1.1.0e-CVS"],
+ ["INSERT INTO webcal_nonuser_cals ( cal_login, cal_admin, cal_url ) VALUES ( 'zzz', 'zzz', 'zzz' )",
+ "DELETE FROM webcal_nonuser_cals WHERE cal_login = 'zzz'",
+ "v1.1.0e-CVS", "upgrade_v1.1.1"],
+ ["INSERT INTO webcal_categories ( cat_id, cat_name, cat_color, cat_owner ) VALUES ( '999', 'zzz', '#FFFFFF', 'nobody' )",
+ "DELETE FROM webcal_categories WHERE cat_id = 999",
+ "v1.1.1", "upgrade_v1.1.2"],
// Upgrade from 1.1.2 -> 1.3.0
- ['INSERT INTO webcal_timezones ( tzid ) VALUES ( "zzz" )',
- 'DELETE FROM webcal_timezones WHERE tzid = "zzz"',
- 'v1.1.2', 'upgrade_v1.3.0'],
+ ["INSERT INTO webcal_timezones ( tzid ) VALUES ( 'zzz' )",
+ "DELETE FROM webcal_timezones WHERE tzid = 'zzz'",
+ "v1.1.2", "upgrade_v1.3.0"],
// Upgrade from 1.3.0 -> 1.9.0
- ['INSERT INTO webcal_import (cal_import_id, cal_md5, cal_date, cal_type) VALUES (999999, "XXX", 1, "X")',
- 'DELETE FROM webcal_import WHERE cal_import_id = 999999',
- 'v1.3.0', 'upgrade_v1.9.0'],
+ ["INSERT INTO webcal_import (cal_import_id, cal_md5, cal_date, cal_type) VALUES (999999, 'XXX', 1, 'X')",
+ "DELETE FROM webcal_import WHERE cal_import_id = 999999",
+ "v1.3.0", "upgrade_v1.9.0"],
// Upgrade from 1.9.0 -> 1.9.6
// Check to see if we can set cat_owner to NULL in webcal_entry_categories
// Should get MySQL error: Column 'cat_owner' cannot be null
- ['INSERT INTO webcal_entry_categories (cal_id, cat_id, cat_order, cat_owner) VALUES (999999, 1, -1, "")',
- 'DELETE FROM webcal_entry_categories WHERE cal_id = 999999 AND cat_order = -1',
- 'v1.9.0', 'upgrade_v1.9.6'],
+ ["INSERT INTO webcal_entry_categories (cal_id, cat_id, cat_order, cat_owner) VALUES (999999, 1, -1, 'nobody')",
+ "DELETE FROM webcal_entry_categories WHERE cal_id = 999999 AND cat_order = -1",
+ "v1.9.0", "upgrade_v1.9.6"],
// Upgrade from 1.9.10 -> 1.9.11
- ['INSERT INTO webcal_categories (cat_id, cat_name, cat_owner, cat_icon_mime) VALUES (999999, "nocat", "nobody", "image/gif")',
- 'DELETE FROM webcal_categories WHERE cat_id = 999999 AND cat_owner = "nobody"',
- 'v1.9.10', 'upgrade_v1.9.11'],
+ ["INSERT INTO webcal_categories (cat_id, cat_name, cat_owner, cat_icon_mime) VALUES (999999, 'nocat', 'nobody', 'image/gif')",
+ "DELETE FROM webcal_categories WHERE cat_id = 999999 AND cat_owner = 'nobody'",
+ "v1.9.10", "upgrade_v1.9.11"],
// Upgrade from 1.9.11 -> 1.9.12
- ["insert into webcal_entry (cal_id, cal_name, cal_create_by, cal_date, cal_duration, cal_url) values (-999, 'Test', 'nobody', 20201231, 0, '01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789')",
- 'delete from webcal_entry where cal_id = -999',
- 'v1.9.11', 'upgrade_v1.9.12'],
+ ["INSERT INTO webcal_entry (cal_id, cal_name, cal_create_by, cal_date, cal_duration, cal_url) VALUES (-999, 'Test', 'nobody', 20201231, 0, '01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789')",
+ "DELETE FROM webcal_entry WHERE cal_id = -999",
+ "v1.9.11", "upgrade_v1.9.12"],
// don't change this array element
- ['','', $PROGRAM_VERSION, '']
+ ["","", $PROGRAM_VERSION, ""]
];
?>
diff --git a/translations/English-US.txt b/translations/English-US.txt
index 9e559656e..0a7ec916b 100644
--- a/translations/English-US.txt
+++ b/translations/English-US.txt
@@ -36,7 +36,7 @@
# Translate "May_" to the full month name and "May" to the,
# usually three-letter, month abbreviation (like "Oct" for "October").
#
-# Translation last updated on 12-08-2023
+# Translation last updated on 01-23-2024
charset: iso-8859-1
direction: ltr
@@ -1928,6 +1928,12 @@ PHP Info: PHP Info
#
Database tables successfully created: Database tables successfully created
+########################################
+# Page: install/install_createdb_handler.php
+#
+Database XXX already exists.: Database XXX already exists.
+Created database XXX: Created database XXX
+
########################################
# Page: install/install_ajax.php
#