/**
* A class that implements the Slony 1.0.x support plugin
*
- * $Id: Slony.php,v 1.12 2006/10/01 23:42:18 xzilla Exp $
+ * $Id: Slony.php,v 1.13 2006/12/31 16:21:26 soranzo Exp $
*/
include_once('./classes/plugins/Plugin.php');
}
/**
- * Removes a table from a replication set
+ * Drops a table from a replication set
*/
- function removeTable($tab_id) {
+ function dropTable($tab_id) {
global $data;
$schema = $this->slony_schema;
return $data->execute($sql); }
/**
- * Removes a sequence from a replication set
+ * Drops a sequence from a replication set
*/
- function removeSequence($seq_id) {
+ function dropSequence($seq_id) {
global $data;
$schema = $this->slony_schema;
/**
* Manage functions in a database
*
- * $Id: functions.php,v 1.56 2006/11/01 00:02:20 xzilla Exp $
+ * $Id: functions.php,v 1.57 2006/12/31 16:21:26 soranzo Exp $
*/
// Include application functions
echo "{$szJSArguments}\n";
echo "<tr>\n";
echo "<th class=\"data required\">{$lang['strargmode']}</th>\n";
- echo "<th class=\"data required\">{$lang['strargname']}</th>\n";
+ echo "<th class=\"data required\">{$lang['strname']}</th>\n";
echo "<th class=\"data required\" colspan=\"2\">{$lang['strargtype']}</th>\n";
echo "</tr>\n";
echo "{$szJSAddTR}\n";
/**
* Help page redirection/browsing.
*
- * $Id: help.php,v 1.2 2005/10/18 03:45:16 chriskl Exp $
+ * $Id: help.php,v 1.3 2006/12/31 16:21:26 soranzo Exp $
*/
- # TODO: Localize messages, improve (or remove) help browser
-
// Include application functions
include_once('./libraries/lib.inc.php');
$action = (isset($_REQUEST['action'])) ? $_REQUEST['action'] : '';
function doDefault() {
- global $data;
+ global $data, $lang;
if (isset($_REQUEST['help'])) {
$url = $data->getHelp($_REQUEST['help']);
}
}
- doBrowse('Invalid help page');
+ doBrowse($lang['strinvalidhelppage']);
}
function doBrowse($msg = '') {
- global $misc, $data;
+ global $misc, $data, $lang;
- $misc->printHeader('Help page browser');
+ $misc->printHeader($lang['strhelppagebrowser']);
$misc->printBody();
- $misc->printTitle('PostgreSQL and phpPgAdmin Help');
+ $misc->printTitle($lang['strselecthelppage']);
- echo $misc->printVal($msg);
+ echo $misc->printMsg($msg);
echo "<dl>\n";
}
function doChoosePage($urls) {
- global $misc;
+ global $misc, $lang;
- $misc->printHeader('Help page browser');
+ $misc->printHeader($lang['strhelppagebrowser']);
$misc->printBody();
- $misc->printTitle('Please select a help page');
+ $misc->printTitle($lang['strselecthelppage']);
echo "<ul>\n";
foreach($urls as $url) {
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.198 2006/12/28 04:26:55 xzilla Exp $
+ * $Id: english.php,v 1.199 2006/12/31 16:21:26 soranzo Exp $
*/
// Language and character set
$lang['strreindex'] = 'Reindex';
$lang['strrun'] = 'Run';
$lang['stradd'] = 'Add';
- $lang['strremove'] = 'Remove';
$lang['strevent'] = 'Event';
$lang['strwhere'] = 'Where';
$lang['strinstead'] = 'Do Instead';
$lang['strfileimported'] = 'File imported.';
$lang['strtrycred'] = 'Use these credentials for all servers';
- // Database Sizes
+ // Database sizes
$lang['strsize'] = 'Size';
$lang['strbytes'] = 'bytes';
$lang['strkb'] = 'kB';
$lang['strimporterror'] = 'Import error.';
$lang['strimporterror-fileformat'] = 'Import error: Failed to automatically determine the file format.';
$lang['strimporterrorline'] = 'Import error on line %s.';
- $lang['strimporterrorline-badcolumnnum'] = 'Import error on line %s: Line does not possess the correct number of columns.';
+ $lang['strimporterrorline-badcolumnnum'] = 'Import error on line %s: Line does not possess the correct number of columns.';
$lang['strimporterror-uploadedfile'] = 'Import error: File could not be uploaded to the server';
$lang['strcannotdumponwindows'] = 'Dumping of complex table and schema names on Windows is not supported.';
$lang['strestimatedrowcount'] = 'Estimated row count';
// Columns
- $lang['strcolprop'] = 'Column Properties';
+ $lang['strcolprop'] = 'Column properties';
// Users
$lang['struser'] = 'User';
// Groups
$lang['strgroup'] = 'Group';
$lang['strgroups'] = 'Groups';
+ $lang['strshowallgroups'] = 'Show all groups';
$lang['strnogroup'] = 'Group not found.';
$lang['strnogroups'] = 'No groups found.';
$lang['strcreategroup'] = 'Create group';
- $lang['strshowallgroups'] = 'Show all groups';
$lang['strgroupneedsname'] = 'You must give a name for your group.';
$lang['strgroupcreated'] = 'Group created.';
$lang['strgroupcreatedbad'] = 'Group creation failed.';
$lang['strconfdropmember'] = 'Are you sure you want to drop the member "%s" from the group "%s"?';
$lang['strmemberdropped'] = 'Member dropped.';
$lang['strmemberdroppedbad'] = 'Member drop failed.';
-
+
// Roles
$lang['strrole'] = 'Role';
$lang['strroles'] = 'Roles';
- $lang['strrolename'] = 'Rolename';
$lang['strshowallroles'] = 'Show all roles';
+ $lang['strnoroles'] = 'No roles found.';
$lang['strinheritsprivs'] = 'Inherits privileges?';
$lang['strcreaterole'] = 'Create role';
- $lang['strcancreaterole'] = 'Create role?';
+ $lang['strcancreaterole'] = 'Can create role?';
$lang['strrolecreated'] = 'Role created.';
$lang['strrolecreatedbad'] = 'Create role failed.';
$lang['stralterrole'] = 'Alter role';
- $lang['strroleupdated'] = 'Role updated.';
- $lang['strroleupdatedbad'] = 'Role update failed.';
- $lang['strcatupdate'] = 'Modify catalogs?';
+ $lang['strrolealtered'] = 'Role altered.';
+ $lang['strrolealteredbad'] = 'Role alter failed.';
$lang['strcanlogin'] = 'Can login?';
$lang['strconnlimit'] = 'Connection limit';
$lang['strdroprole'] = 'Drop role';
- $lang['strmaxconnections'] = 'Max connections';
- $lang['strconfdroprole'] = 'Are you sure you want to drop the role "%s"?';
+ $lang['strconfdroprole'] = 'Are you sure you want to drop the role "%s"?';
$lang['strroledropped'] = 'Role dropped.';
$lang['strroledroppedbad'] = 'Role drop failed.';
- $lang['strnoroles'] = 'No roles found.';
$lang['strnolimit'] = 'No limit';
$lang['strnever'] = 'Never';
$lang['strroleneedsname'] = 'You must give a name for the role.';
$lang['strdatabase'] = 'Database';
$lang['strdatabases'] = 'Databases';
$lang['strshowalldatabases'] = 'Show all databases';
- $lang['strnodatabase'] = 'No database found.';
$lang['strnodatabases'] = 'No databases found.';
$lang['strcreatedatabase'] = 'Create database';
$lang['strdatabasename'] = 'Database name';
$lang['strobjectfile'] = 'Object File';
$lang['strlinksymbol'] = 'Link Symbol';
$lang['strarguments'] = 'Arguments';
- $lang['strargname'] = 'Name';
$lang['strargmode'] = 'Mode';
$lang['strargtype'] = 'Type';
$lang['strargadd'] = 'Add another argument';
$lang['strarglower'] = 'Move down.';
$lang['strargremoveconfirm'] = 'Are you sure you want to remove this argument? This CANNOT be undone.';
-
// Triggers
$lang['strtrigger'] = 'Trigger';
$lang['strtriggers'] = 'Triggers';
$lang['straggrinitcond'] = 'Initial condition';
$lang['straggrsortop'] = 'Sort operator';
$lang['strdropaggregate'] = 'Drop aggregate';
- $lang['strconfdropaggregate'] = 'Are you sure you want to drop the aggregate "%s"?';
+ $lang['strconfdropaggregate'] = 'Are you sure you want to drop the aggregate "%s"?';
$lang['straggregatedropped'] = 'Aggregate dropped.';
$lang['straggregatedroppedbad'] = 'Aggregate drop failed.';
$lang['stralteraggregate'] = 'Alter aggregate';
$lang['strtableneedsuniquekey'] = 'Table to be added requires a primary or unique key.';
$lang['strtableaddedtorepset'] = 'Table added to replication set.';
$lang['strtableaddedtorepsetbad'] = 'Failed adding table to replication set.';
- $lang['strconfremovetablefromrepset'] = 'Are you sure you want to remove the table "%s" from replication set "%s"?';
- $lang['strtableremovedfromrepset'] = 'Table removed from replication set.';
- $lang['strtableremovedfromrepsetbad'] = 'Failed to remove table from replication set.';
+ $lang['strconfremovetablefromrepset'] = 'Are you sure you want to drop the table "%s" from replication set "%s"?';
+ $lang['strtableremovedfromrepset'] = 'Table dropped from replication set.';
+ $lang['strtableremovedfromrepsetbad'] = 'Failed to drop table from replication set.';
// Slony sequences in replication sets
$lang['straddsequence'] = 'Add sequence';
$lang['strsequenceaddedtorepset'] = 'Sequence added to replication set.';
$lang['strsequenceaddedtorepsetbad'] = 'Failed adding sequence to replication set.';
- $lang['strconfremovesequencefromrepset'] = 'Are you sure you want to remove the sequence "%s" from replication set "%s"?';
- $lang['strsequenceremovedfromrepset'] = 'Sequence removed from replication set.';
- $lang['strsequenceremovedfromrepsetbad'] = 'Failed to remove sequence from replication set.';
+ $lang['strconfremovesequencefromrepset'] = 'Are you sure you want to drop the sequence "%s" from replication set "%s"?';
+ $lang['strsequenceremovedfromrepset'] = 'Sequence dropped from replication set.';
+ $lang['strsequenceremovedfromrepsetbad'] = 'Failed to drop sequence from replication set.';
// Slony subscriptions
$lang['strsubscriptions'] = 'Subscriptions';
$lang['strtimefmt'] = 'jS M, Y g:iA';
$lang['strhelp'] = 'Help';
$lang['strhelpicon'] = '?';
+ $lang['strhelppagebrowser'] = 'Help page browser';
+ $lang['strselecthelppage'] = 'Select a help page';
+ $lang['strinvalidhelppage'] = 'Invalid help page.';
$lang['strlogintitle'] = 'Login to %s';
$lang['strlogoutmsg'] = 'Logged out of %s';
$lang['strloading'] = 'Loading...';
$lang['strerrorloading'] = 'Error Loading';
$lang['strclicktoreload'] = 'Click to reload';
- //Autovacuum
+ // Autovacuum
$lang['strautovacuum'] = 'Autovacuum';
$lang['strturnedon'] = 'Turned On';
$lang['strturnedoff'] = 'Turned Off';
$lang['strvacuumcostdelay'] = 'Vacuum Cost Delay';
$lang['strvacuumcostlimit'] = 'Vacuum Cost Limit';
- //Table-level Locks
+ // Table-level Locks
$lang['strlocks'] = 'Locks';
$lang['strtransaction'] = 'Transaction ID';
$lang['strprocessid'] = 'Process ID';
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.151 2006/12/28 04:26:55 xzilla Exp $
+ * $Id: english.php,v 1.152 2006/12/31 16:21:27 soranzo Exp $
*/
// Language and character set
$lang['strreindex'] = 'Reindex';
$lang['strrun'] = 'Run';
$lang['stradd'] = 'Add';
- $lang['strremove'] = 'Remove';
$lang['strevent'] = 'Event';
$lang['strwhere'] = 'Where';
$lang['strinstead'] = 'Do Instead';
$lang['strfileimported'] = 'File imported.';
$lang['strtrycred'] = 'Use these credentials for all servers';
- // Database Sizes
+ // Database sizes
$lang['strsize'] = 'Size';
$lang['strbytes'] = 'bytes';
$lang['strkb'] = 'kB';
$lang['strimporterror'] = 'Import error.';
$lang['strimporterror-fileformat'] = 'Import error: Failed to automatically determine the file format.';
$lang['strimporterrorline'] = 'Import error on line %s.';
- $lang['strimporterrorline-badcolumnnum'] = 'Import error on line %s: Line does not possess the correct number of columns.';
+ $lang['strimporterrorline-badcolumnnum'] = 'Import error on line %s: Line does not possess the correct number of columns.';
$lang['strimporterror-uploadedfile'] = 'Import error: File could not be uploaded to the server';
$lang['strcannotdumponwindows'] = 'Dumping of complex table and schema names on Windows is not supported.';
$lang['strestimatedrowcount'] = 'Estimated row count';
// Columns
- $lang['strcolprop'] = 'Column Properties';
+ $lang['strcolprop'] = 'Column properties';
// Users
$lang['struser'] = 'User';
// Groups
$lang['strgroup'] = 'Group';
$lang['strgroups'] = 'Groups';
+ $lang['strshowallgroups'] = 'Show all groups';
$lang['strnogroup'] = 'Group not found.';
$lang['strnogroups'] = 'No groups found.';
$lang['strcreategroup'] = 'Create group';
- $lang['strshowallgroups'] = 'Show all groups';
$lang['strgroupneedsname'] = 'You must give a name for your group.';
$lang['strgroupcreated'] = 'Group created.';
$lang['strgroupcreatedbad'] = 'Group creation failed.';
// Roles
$lang['strrole'] = 'Role';
$lang['strroles'] = 'Roles';
- $lang['strrolename'] = 'Rolename';
$lang['strshowallroles'] = 'Show all roles';
+ $lang['strnoroles'] = 'No roles found.';
$lang['strinheritsprivs'] = 'Inherits privileges?';
$lang['strcreaterole'] = 'Create role';
- $lang['strcancreaterole'] = 'Create role?';
+ $lang['strcancreaterole'] = 'Can create role?';
$lang['strrolecreated'] = 'Role created.';
$lang['strrolecreatedbad'] = 'Create role failed.';
$lang['stralterrole'] = 'Alter role';
- $lang['strroleupdated'] = 'Role updated.';
- $lang['strroleupdatedbad'] = 'Role update failed.';
- $lang['strcatupdate'] = 'Modify catalogs?';
+ $lang['strrolealtered'] = 'Role altered.';
+ $lang['strrolealteredbad'] = 'Role alter failed.';
$lang['strcanlogin'] = 'Can login?';
$lang['strconnlimit'] = 'Connection limit';
$lang['strdroprole'] = 'Drop role';
- $lang['strmaxconnections'] = 'Max connections';
$lang['strconfdroprole'] = 'Are you sure you want to drop the role "%s"?';
$lang['strroledropped'] = 'Role dropped.';
$lang['strroledroppedbad'] = 'Role drop failed.';
- $lang['strnoroles'] = 'No roles found.';
$lang['strnolimit'] = 'No limit';
$lang['strnever'] = 'Never';
$lang['strroleneedsname'] = 'You must give a name for the role.';
-
+
// Privileges
$lang['strprivilege'] = 'Privilege';
$lang['strprivileges'] = 'Privileges';
$lang['strdatabase'] = 'Database';
$lang['strdatabases'] = 'Databases';
$lang['strshowalldatabases'] = 'Show all databases';
- $lang['strnodatabase'] = 'No database found.';
$lang['strnodatabases'] = 'No databases found.';
$lang['strcreatedatabase'] = 'Create database';
$lang['strdatabasename'] = 'Database name';
$lang['strobjectfile'] = 'Object File';
$lang['strlinksymbol'] = 'Link Symbol';
$lang['strarguments'] = 'Arguments';
- $lang['strargname'] = 'Name';
$lang['strargmode'] = 'Mode';
$lang['strargtype'] = 'Type';
$lang['strargadd'] = 'Add another argument';
$lang['strarglower'] = 'Move down.';
$lang['strargremoveconfirm'] = 'Are you sure you want to remove this argument? This CANNOT be undone.';
-
// Triggers
$lang['strtrigger'] = 'Trigger';
$lang['strtriggers'] = 'Triggers';
$lang['strtableneedsuniquekey'] = 'Table to be added requires a primary or unique key.';
$lang['strtableaddedtorepset'] = 'Table added to replication set.';
$lang['strtableaddedtorepsetbad'] = 'Failed adding table to replication set.';
- $lang['strconfremovetablefromrepset'] = 'Are you sure you want to remove the table "%s" from replication set "%s"?';
- $lang['strtableremovedfromrepset'] = 'Table removed from replication set.';
- $lang['strtableremovedfromrepsetbad'] = 'Failed to remove table from replication set.';
+ $lang['strconfremovetablefromrepset'] = 'Are you sure you want to drop the table "%s" from replication set "%s"?';
+ $lang['strtableremovedfromrepset'] = 'Table dropped from replication set.';
+ $lang['strtableremovedfromrepsetbad'] = 'Failed to drop table from replication set.';
// Slony sequences in replication sets
$lang['straddsequence'] = 'Add sequence';
$lang['strsequenceaddedtorepset'] = 'Sequence added to replication set.';
$lang['strsequenceaddedtorepsetbad'] = 'Failed adding sequence to replication set.';
- $lang['strconfremovesequencefromrepset'] = 'Are you sure you want to remove the sequence "%s" from replication set "%s"?';
- $lang['strsequenceremovedfromrepset'] = 'Sequence removed from replication set.';
- $lang['strsequenceremovedfromrepsetbad'] = 'Failed to remove sequence from replication set.';
+ $lang['strconfremovesequencefromrepset'] = 'Are you sure you want to drop the sequence "%s" from replication set "%s"?';
+ $lang['strsequenceremovedfromrepset'] = 'Sequence dropped from replication set.';
+ $lang['strsequenceremovedfromrepsetbad'] = 'Failed to drop sequence from replication set.';
// Slony subscriptions
$lang['strsubscriptions'] = 'Subscriptions';
$lang['strtimefmt'] = 'jS M, Y g:iA';
$lang['strhelp'] = 'Help';
$lang['strhelpicon'] = '?';
+ $lang['strhelppagebrowser'] = 'Help page browser';
+ $lang['strselecthelppage'] = 'Select a help page';
+ $lang['strinvalidhelppage'] = 'Invalid help page.';
$lang['strlogintitle'] = 'Login to %s';
$lang['strlogoutmsg'] = 'Logged out of %s';
$lang['strloading'] = 'Loading...';
$lang['strerrorloading'] = 'Error Loading';
$lang['strclicktoreload'] = 'Click to reload';
- //Autovacuum
+ // Autovacuum
$lang['strautovacuum'] = 'Autovacuum';
$lang['strturnedon'] = 'Turned On';
$lang['strturnedoff'] = 'Turned Off';
$lang['strvacuumcostdelay'] = 'Vacuum Cost Delay';
$lang['strvacuumcostlimit'] = 'Vacuum Cost Limit';
- //Table-level Locks
+ // Table-level Locks
$lang['strlocks'] = 'Locks';
$lang['strtransaction'] = 'Transaction ID';
$lang['strprocessid'] = 'Process ID';
/**
* Slony database tab plugin
*
- * $Id: plugin_slony.php,v 1.12 2006/10/01 23:42:18 xzilla Exp $
+ * $Id: plugin_slony.php,v 1.13 2006/12/31 16:21:26 soranzo Exp $
*/
// Include application functions
case 'clusters_top':
case 'nodes_top':
case 'sets_top':
- $_no_db_connection = true;
- break;
+ $_no_db_connection = true;
+ break;
default:
}
'url' => "redirect.php?subject=table&{$misc->href}&",
'vars' => array('table' => 'relname', 'schema' => 'nspname'),
),
- 'remove' => array(
- 'title' => $lang['strremove'],
+ 'drop' => array(
+ 'title' => $lang['strdrop'],
'url' => "plugin_slony.php?{$misc->href}&action=confirm_drop_table&set_id={$_REQUEST['set_id']}&",
'vars' => array('tab_id' => 'tab_id', 'qualname' => 'qualname'),
),
* Show confirmation of drop and perform actual drop of a table from a
* replication set.
*/
- function doRemoveTable($confirm) {
+ function doDropTable($confirm) {
global $slony, $misc;
global $PHP_SELF, $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
- $misc->printTitle('Remove');
+ $misc->printTitle($lang['strdrop']);
echo "<p>", sprintf($lang['strconfremovetablefromrepset'],
$misc->printVal($_REQUEST['qualname']), $misc->printVal($_REQUEST['set_id'])), "</p>\n";
echo "<input type=\"hidden\" name=\"set_id\" value=\"", htmlspecialchars($_REQUEST['set_id']), "\" />\n";
echo "<input type=\"hidden\" name=\"tab_id\" value=\"", htmlspecialchars($_REQUEST['tab_id']), "\" />\n";
echo $misc->form;
- echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strremove']}\" />\n";
+ echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n";
echo "</form>\n";
}
else {
- $status = $slony->removeTable($_REQUEST['tab_id']);
+ $status = $slony->dropTable($_REQUEST['tab_id']);
if ($status == 0)
doTables($lang['strtableremovedfromrepset']);
else
'url' => "sequences.php?action=properties&{$misc->href}&",
'vars' => array('sequence' => 'seqname', 'schema' => 'nspname'),
),
- 'remove' => array(
- 'title' => $lang['strremove'],
+ 'drop' => array(
+ 'title' => $lang['strdrop'],
'url' => "plugin_slony.php?{$misc->href}&action=confirm_drop_sequence&set_id={$_REQUEST['set_id']}&",
'vars' => array('seq_id' => 'seq_id', 'qualname' => 'qualname'),
),
* Show confirmation of drop and perform actual drop of a sequence from a
* replication set.
*/
- function doRemoveSequence($confirm) {
+ function doDropSequence($confirm) {
global $slony, $misc;
global $PHP_SELF, $lang;
if ($confirm) {
$misc->printTrail('slony_cluster');
- $misc->printTitle($lang['strremove']);
+ $misc->printTitle($lang['strdrop']);
echo "<p>", sprintf($lang['strconfremovesequencefromrepset'],
$misc->printVal($_REQUEST['qualname']), $misc->printVal($_REQUEST['set_id'])), "</p>\n";
echo "<input type=\"hidden\" name=\"set_id\" value=\"", htmlspecialchars($_REQUEST['set_id']), "\" />\n";
echo "<input type=\"hidden\" name=\"seq_id\" value=\"", htmlspecialchars($_REQUEST['seq_id']), "\" />\n";
echo $misc->form;
- echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strremove']}\" />\n";
+ echo "<input type=\"submit\" name=\"drop\" value=\"{$lang['strdrop']}\" />\n";
echo "<input type=\"submit\" name=\"cancel\" value=\"{$lang['strcancel']}\" />\n";
echo "</form>\n";
}
else {
- $status = $slony->removeSequence($_REQUEST['seq_id']);
+ $status = $slony->dropSequence($_REQUEST['seq_id']);
if ($status == 0)
doSequences($lang['strsequenceremovedfromrepset']);
else
break;
case 'drop_table':
if (isset($_POST['cancel'])) doTables();
- else doRemoveTable(false);
+ else doDropTable(false);
break;
case 'confirm_drop_table':
- doRemoveTable(true);
+ doDropTable(true);
break;
case 'move_table':
if (isset($_REQUEST['cancel'])) doTables();
break;
case 'drop_sequence':
if (isset($_POST['cancel'])) doSequences();
- else doRemoveSequence(false);
+ else doDropSequence(false);
break;
case 'confirm_drop_sequence':
- doRemoveSequence(true);
+ doDropSequence(true);
break;
case 'move_sequence':
if (isset($_REQUEST['cancel'])) doSequences();
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
- echo "\t<tr>\n\t\t<th class=\"data left required\" width=\"130\">{$lang['strrolename']}</th>\n";
+ echo "\t<tr>\n\t\t<th class=\"data left required\" width=\"130\">{$lang['strname']}</th>\n";
echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"15\" name=\"formRolename\" value=\"", htmlspecialchars($_POST['formRolename']), "\" /></td>\n\t</tr>\n";
echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strpassword']}</th>\n";
echo "\t\t<td class=\"data1\"><input size=\"15\" maxlength=\"32\" type=\"password\" name=\"formPassword\" value=\"", htmlspecialchars($_POST['formPassword']), "\" /></td>\n\t</tr>\n";
echo "<form action=\"$PHP_SELF\" method=\"post\">\n";
echo $misc->form;
echo "<table>\n";
- echo "\t<tr>\n\t\t<th class=\"data left\" width=\"130\">{$lang['strrolename']}</th>\n";
+ echo "\t<tr>\n\t\t<th class=\"data left\" width=\"130\">{$lang['strname']}</th>\n";
echo "\t\t<td class=\"data1\">", ($canRename ? "<input name=\"formNewRoleName\" size=\"15\" maxlength=\"15\" value=\"" . htmlspecialchars($_POST['formNewRoleName']) . "\" />" : $misc->printVal($roledata->f['rolname'])), "</td>\n\t</tr>\n";
echo "\t<tr>\n\t\t<th class=\"data left\">{$lang['strpassword']}</th>\n";
echo "\t\t<td class=\"data1\"><input type=\"password\" size=\"15\" maxlength=\"32\" name=\"formPassword\" value=\"", htmlspecialchars($_POST['formPassword']), "\" /></td>\n\t</tr>\n";
if (isset($_POST['formNewRoleName'])) $status = $data->setRenameRole($_POST['rolename'], $_POST['formPassword'], isset($_POST['formSuper']), isset($_POST['formCreateDB']), isset($_POST['formCreateRole']), isset($_POST['formInherits']), isset($_POST['formCanLogin']), $_POST['formConnLimit'], $_POST['formExpires'], $_POST['memberof'], $_POST['members'], $_POST['adminmembers'], $_POST['memberofold'], $_POST['membersold'], $_POST['adminmembersold'], $_POST['formNewRoleName']);
else $status = $data->setRole($_POST['rolename'], $_POST['formPassword'], isset($_POST['formSuper']), isset($_POST['formCreateDB']), isset($_POST['formCreateRole']), isset($_POST['formInherits']), isset($_POST['formCanLogin']), $_POST['formConnLimit'], $_POST['formExpires'], $_POST['memberof'], $_POST['members'], $_POST['adminmembers'], $_POST['memberofold'], $_POST['membersold'], $_POST['adminmembersold']);
if ($status == 0)
- doDefault($lang['strroleupdated']);
+ doDefault($lang['strrolealtered']);
else
- doAlter($lang['strroleupdatedbad']);
+ doAlter($lang['strrolealteredbad']);
}
}
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data\" width=\"130\">Description</th>\n";
echo "\t\t<th class=\"data\" width=\"120\">Value</th>\n\t</tr>\n";
- echo "\t<tr>\n\t\t<td class=\"data1\">{$lang['strrolename']}</td>\n";
+ echo "\t<tr>\n\t\t<td class=\"data1\">{$lang['strname']}</td>\n";
echo "\t\t<td class=\"data1\">", htmlspecialchars($_REQUEST['rolename']), "</td>\n\t</tr>\n";
echo "\t<tr>\n\t\t<td class=\"data2\">{$lang['strsuper']}</td>\n";
echo "\t\t<td class=\"data2\">", (($roledata->f['rolsuper']) ? $lang['stryes'] : $lang['strno']), "</td>\n\t</tr>\n";
echo "\t<tr>\n\t\t<td class=\"data1\">{$lang['strconnlimit']}</td>\n";
echo "\t\t<td class=\"data1\">", ($roledata->f['rolconnlimit'] == '-1' ? $lang['strnolimit'] : $misc->printVal($roledata->f['rolconnlimit'])), "</td>\n";
echo "\t<tr>\n\t\t<td class=\"data2\">{$lang['strexpires']}</td>\n";
- echo "\t\t<td class=\"data2\">", ($roledata->f['rolvaliduntil'] == 'infinity' ? $lang['strnever'] : $misc->printVal($roledata->f['rolvaliduntil'])), "</td>\n";
+ echo "\t\t<td class=\"data2\">", ($roledata->f['rolvaliduntil'] == 'infinity' || $roledata->f['rolvaliduntil'] == '' ? $lang['strnever'] : $misc->printVal($roledata->f['rolvaliduntil'])), "</td>\n";
echo "\t<tr>\n\t\t<td class=\"data1\">{$lang['strsessiondefaults']}</td>\n";
echo "\t\t<td class=\"data1\">", $misc->printVal($roledata->f['rolconfig']), "</td>\n";
echo "\t<tr>\n\t\t<td class=\"data2\">{$lang['strmemberof']}</td>\n";
$roledata->f['rolcreaterole'] = $data->phpBool($roledata->f['rolcreaterole']);
$roledata->f['rolinherit'] = $data->phpBool($roledata->f['rolinherit']);
echo "<table>\n";
- echo "\t<tr>\n\t\t<th class=\"data\">{$lang['strrolename']}</th>\n";
+ echo "\t<tr>\n\t\t<th class=\"data\">{$lang['strname']}</th>\n";
echo "\t\t<th class=\"data\">{$lang['strsuper']}</th>\n";
echo "\t\t<th class=\"data\">{$lang['strcreatedb']}</th>\n";
echo "\t\t<th class=\"data\">{$lang['strcancreaterole']}</th>\n";
echo "\t\t<td class=\"data1\" id=\"center\">", (($roledata->f['rolcreaterole']) ? $lang['stryes'] : $lang['strno']), "</td>\n";
echo "\t\t<td class=\"data1\" id=\"center\">", (($roledata->f['rolinherit']) ? $lang['stryes'] : $lang['strno']), "</td>\n";
echo "\t\t<td class=\"data1\" id=\"center\">", ($roledata->f['rolconnlimit'] == '-1' ? $lang['strnolimit'] : $misc->printVal($roledata->f['rolconnlimit'])), "</td>\n";
- echo "\t\t<td class=\"data1\">", ($roledata->f['rolvaliduntil'] == 'infinity' ? $lang['strnever'] : $misc->printVal($roledata->f['rolvaliduntil'])), "</td>\n";
+ echo "\t\t<td class=\"data1\">", ($roledata->f['rolvaliduntil'] == 'infinity' || $roledata->f['rolvaliduntil'] == '' ? $lang['strnever'] : $misc->printVal($roledata->f['rolvaliduntil'])), "</td>\n";
echo "\t\t<td class=\"data1\">", $misc->printVal($roledata->f['rolconfig']), "</td>\n";
echo "\t</tr>\n</table>\n";
}
$roles = $data->getRoles();
$columns = array(
- 'rolename' => array(
- 'title' => $lang['strrolename'],
+ 'role' => array(
+ 'title' => $lang['strrole'],
'field' => 'rolname',
),
'superuser' => array(
/**
* Manage users in a database cluster
*
- * $Id: users.php,v 1.32 2006/06/17 12:57:36 xzilla Exp $
+ * $Id: users.php,v 1.33 2006/12/31 16:21:26 soranzo Exp $
*/
// Include application functions
global $PHP_SELF, $lang;
function renderUseExpires($val) {
- return $val == 'infinity' ? '' : htmlspecialchars($val);
+ return $val == 'infinity' ? $lang['strnever'] : htmlspecialchars($val);
}
$misc->printTrail('server');