From: Robert Treat Date: Fri, 3 Jul 2009 23:14:28 +0000 (-0400) Subject: add option for specifying the template database during database creation. prompted... X-Git-Tag: REL_5-0-BETA-1~102 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=3914822d2957382eb1debb164f03d80db7d7ae2c;p=phppgadmin.git 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 --- 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