* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres.php,v 1.173 2004/01/03 19:15:44 soranzo Exp $
+ * $Id: Postgres.php,v 1.174 2004/01/07 16:29:40 soranzo Exp $
*/
// @@@ THOUGHT: What about inherits? ie. use of ONLY???
}
/**
- * Return information about a single user
+ * Returns information about a single user
* @param $username The username of the user to retrieve
* @return The user's data
*/
}
/**
- * Return users in a specific group
+ * Returns users in a specific group
* @param $groname The name of the group
* @return All users in the group
*/
function hasSRFs() { return true; }
function hasOpClasses() { return true; }
function hasUserSessionDefaults() { return false; }
+ function hasUserRename() { return false; }
}
* A class that implements the DB interface for Postgres
* Note: This class uses ADODB and returns RecordSets.
*
- * $Id: Postgres74.php,v 1.21 2003/12/17 09:11:32 chriskl Exp $
+ * $Id: Postgres74.php,v 1.22 2004/01/07 16:29:40 soranzo Exp $
*/
include_once('./classes/database/Postgres73.php');
}
/**
- * Drop a domain constraint
+ * Drops a domain constraint
* @param $domain The domain from which to remove the constraint
* @param $constraint The constraint to remove
* @param $cascade True to cascade, false otherwise
return $this->endTransaction();
}
-
+
+ /**
+ * Renames a user
+ * @param $username The username of the user to rename
+ * @param $newname The new name of the user
+ * @return 0 success
+ */
+ function renameUser($username, $newname){
+ $this->fieldClean($username);
+ $this->fieldClean($newname);
+
+ $sql = "ALTER USER \"{$username}\" RENAME TO \"{$newname}\"";
+
+ return $this->execute($sql);
+ }
+
// Capabilities
function hasGrantOption() { return true; }
function hasDomainConstraints() { return true; }
+ function hasUserRename() { return true; }
}
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.128 2004/01/03 19:15:45 soranzo Exp $
+ * $Id: english.php,v 1.129 2004/01/07 16:29:40 soranzo Exp $
*/
// Language and character set
$lang['strcreatedb'] = 'Create DB?';
$lang['strexpires'] = 'Expires';
$lang['strsessiondefaults'] = 'Session Defaults';
+ $lang['strnewname'] = 'New name';
$lang['strnousers'] = 'No users found.';
+ $lang['strrename'] = 'Rename';
+ $lang['struserrenamed'] = 'User renamed.';
+ $lang['struserrenamedbad'] = 'Failed to rename user.';
$lang['struserupdated'] = 'User updated.';
$lang['struserupdatedbad'] = 'User update failed.';
$lang['strshowallusers'] = 'Show all users';
$lang['strnoopclasses'] = 'No operator classes found.';
$lang['straccessmethod'] = 'Access method';
- // Stats & Performance
+ // Stats and performance
$lang['strrowperf'] = 'Row Performance';
$lang['strioperf'] = 'I/O Performance';
$lang['stridxrowperf'] = 'Index Row Performance';
$lang['strtimefmt'] = 'jS M, Y g:iA';
$lang['strhelp'] = 'Help';
-
?>
* Italian language file, based on the english language file for phpPgAdmin.
* Nicola Soranzo [nsoranzo@tiscali.it]
*
- * $Id: italian.php,v 1.24 2004/01/03 19:15:45 soranzo Exp $
+ * $Id: italian.php,v 1.25 2004/01/07 16:29:41 soranzo Exp $
*/
// Language and character set - Lingua e set di caratteri
$lang['strcreatedb'] = 'Puรฒ creare DB?';
$lang['strexpires'] = 'Scadenza';
$lang['strsessiondefaults'] = 'Defaults della sessione';
+ $lang['strnewname'] = 'Nuovo nome';
$lang['strnousers'] = 'Nessun utente trovato';
+ $lang['strrename'] = 'Rinomina';
+ $lang['struserrenamed'] = 'Utente rinominato.';
+ $lang['struserrenamedbad'] = 'Rinomina dell\'utente fallita.';
$lang['struserupdated'] = 'Utente aggiornato.';
$lang['struserupdatedbad'] = 'Aggiornamento utente fallito.';
$lang['strshowallusers'] = 'Mostra tutti gli utenti';
* English language file for phpPgAdmin. Use this as a basis
* for new translations.
*
- * $Id: english.php,v 1.80 2004/01/03 19:15:45 soranzo Exp $
+ * $Id: english.php,v 1.81 2004/01/07 16:29:41 soranzo Exp $
*/
// Language and character set
$lang['strprocess'] = 'Process';
$lang['strprocesses'] = 'Processes';
$lang['strsetting'] = 'Setting';
+ $lang['strparameters'] = 'Parameters';
// Error handling
$lang['strnoframes'] = 'You need a frames-enabled browser to use this application.';
$lang['strcreatedb'] = 'Create DB?';
$lang['strexpires'] = 'Expires';
$lang['strsessiondefaults'] = 'Session Defaults';
+ $lang['strnewname'] = 'New name';
$lang['strnousers'] = 'No users found.';
+ $lang['strrename'] = 'Rename';
+ $lang['struserrenamed'] = 'User renamed.';
+ $lang['struserrenamedbad'] = 'Failed to rename user.';
$lang['struserupdated'] = 'User updated.';
$lang['struserupdatedbad'] = 'User update failed.';
$lang['strshowallusers'] = 'Show all users';
$lang['strnoopclasses'] = 'No operator classes found.';
$lang['straccessmethod'] = 'Access method';
- // Stats & Performance
+ // Stats and performance
$lang['strrowperf'] = 'Row Performance';
$lang['strioperf'] = 'I/O Performance';
$lang['stridxrowperf'] = 'Index Row Performance';
* Italian language file, based on the english language file for phpPgAdmin.
* Nicola Soranzo [nsoranzo@tiscali.it]
*
- * $Id: italian.php,v 1.19 2004/01/03 19:15:45 soranzo Exp $
+ * $Id: italian.php,v 1.20 2004/01/07 16:29:41 soranzo Exp $
*/
// Language and character set - Lingua e set di caratteri
$lang['strcreatedb'] = 'Può creare DB?';
$lang['strexpires'] = 'Scadenza';
$lang['strsessiondefaults'] = 'Defaults della sessione';
+ $lang['strnewname'] = 'Nuovo nome';
$lang['strnousers'] = 'Nessun utente trovato';
+ $lang['strrename'] = 'Rinomina';
+ $lang['struserrenamed'] = 'Utente rinominato.';
+ $lang['struserrenamedbad'] = 'Rinomina dell\'utente fallita.';
$lang['struserupdated'] = 'Utente aggiornato.';
$lang['struserupdatedbad'] = 'Aggiornamento utente fallito.';
$lang['strshowallusers'] = 'Mostra tutti gli utenti';