Fix small typos. Add basic support for user renaming
authorsoranzo <soranzo>
Wed, 7 Jan 2004 16:29:40 +0000 (16:29 +0000)
committersoranzo <soranzo>
Wed, 7 Jan 2004 16:29:40 +0000 (16:29 +0000)
classes/database/Postgres.php
classes/database/Postgres74.php
lang/english.php
lang/italian.php
lang/recoded/english.php
lang/recoded/italian.php

index c05cd5602e1676d02bac59f2b04568ea70c3d2c4..1d129380b64dc7691aa507abeb364b1cafe5c5ab 100755 (executable)
@@ -4,7 +4,7 @@
  * 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???
@@ -2328,7 +2328,7 @@ class Postgres extends BaseDB {
        }
        
        /**
-        * 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
         */
@@ -2434,7 +2434,7 @@ class Postgres extends BaseDB {
        }
 
        /**
-        * 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
         */
@@ -3515,6 +3515,7 @@ class Postgres extends BaseDB {
        function hasSRFs() { return true; }
        function hasOpClasses() { return true; }
        function hasUserSessionDefaults() { return false; }
+       function hasUserRename() { return false; }
 
 }
 
index b34376cb9992585a69c55bcb3c6a9612fada65bc..d6a6c5b68198499f766279f4466c71792c775b67 100644 (file)
@@ -4,7 +4,7 @@
  * 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');
@@ -263,7 +263,7 @@ class Postgres74 extends Postgres73 {
        }
        
        /**
-        * 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
@@ -354,10 +354,26 @@ class Postgres74 extends Postgres73 {
                
                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; }
        
 }
 
index 5d9701ec20c296f8bb90487d90e8931d5e7684ac..57cc09dd3bc1f5ef70439f2b0da40127611d98b8 100755 (executable)
@@ -4,7 +4,7 @@
         * 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';
 
-
 ?>
index 593d102599dd3611d3c8531110c3e5fe0c7b5665..0d299eef504c3c249b6cdfa4a6e1e93aaf64040e 100644 (file)
@@ -4,7 +4,7 @@
         * 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';
index ccdcf908ce29a74f768c2327281d8ace37370f4d..eb8d0f6fd3f66ff8bc1771f9d7fccfe60d881fef 100644 (file)
@@ -4,7 +4,7 @@
         * 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';
index ee602f4dc5e5dc74d2e78d822d8f5df2ef23edb9..5a801c6929bac767ab121f6f4c2d816010177499 100644 (file)
@@ -4,7 +4,7 @@
         * 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&ograve; 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';