From 3914822d2957382eb1debb164f03d80db7d7ae2c Mon Sep 17 00:00:00 2001 From: Robert Treat Date: Fri, 3 Jul 2009 19:14:28 -0400 Subject: [PATCH] add option for specifying the template database during database creation. prompted by changes in 8.4 wrt encoding rules changes, but this should work on all versions. Verified against 8.3 and 8.4 --- all_db.php | 27 ++++++++++++++++++++++++++- classes/database/Postgres.php | 11 +++++------ lang/english.php | 1 + lang/recoded/english.php | 1 + 4 files changed, 33 insertions(+), 7 deletions(-) diff --git a/all_db.php b/all_db.php index bb79cf95..a5f511f4 100644 --- a/all_db.php +++ b/all_db.php @@ -163,9 +163,13 @@ else $_POST['formEncoding'] = ''; } + if (!isset($_POST['formTemplate'])) $_POST['formTemplate'] = 'template1'; if (!isset($_POST['formSpc'])) $_POST['formSpc'] = ''; if (!isset($_POST['formComment'])) $_POST['formComment'] = ''; + // Fetch a list of databases in the cluster + $templatedbs = $data->getDatabases(false); + // Fetch all tablespaces from the database if ($data->hasTablespaces()) $tablespaces = $data->getTablespaces(); @@ -174,6 +178,27 @@ echo "\t\n\t\t{$lang['strname']}\n"; echo "\t\t_maxNameLen}\" value=\"", htmlspecialchars($_POST['formName']), "\" />\n\t\n"; + + echo "\t\n\t\t{$lang['strtemplatedb']}\n"; + echo "\t\t\n"; + echo "\t\t\t\n"; + echo "\t\t\n\t\n"; + echo "\t\n\t\t{$lang['strencoding']}\n"; echo "\t\t\n"; echo "\t\t\t