Localize help.php . Use 'drop' instead of 'remove' in Slony. Print strnever for all...
authorsoranzo <soranzo>
Sun, 31 Dec 2006 16:21:26 +0000 (16:21 +0000)
committersoranzo <soranzo>
Sun, 31 Dec 2006 16:21:26 +0000 (16:21 +0000)
classes/plugins/Slony.php
functions.php
help.php
lang/english.php
lang/recoded/english.php
plugin_slony.php
roles.php
users.php

index 781233f7d5e1b5a056752c585b38530b85a416b3..7385d613cab3d3a59275e44c992000676aa691f2 100755 (executable)
@@ -3,7 +3,7 @@
 /**
  * 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');
@@ -578,9 +578,9 @@ class Slony extends Plugin {
        }
                
        /**
-        * 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;
@@ -681,9 +681,9 @@ class Slony extends Plugin {
                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;
index 017ba2acd647db61faad8cac1253bbdc409b411f..379661a5b988431583df67c6cb1a04b0abbd3675 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * 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";
index e88cc918c62d1b2cf44e2827a55385e3dffab16b..9dbde0eb2d9ea525b2149417a41da3169d7e3e58 100644 (file)
--- a/help.php
+++ b/help.php
@@ -3,11 +3,9 @@
        /**
         * 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');
@@ -15,7 +13,7 @@
        $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) {
index e56a699eeb89b07bbec05879d7738ca1e72b98e1..3d6193a2432bf0b80af2204eb85a572cfc2c917f 100755 (executable)
@@ -4,7 +4,7 @@
         * 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 &quot;%s&quot;?';
+       $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 &quot;%s&quot;?';
+       $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';
index fe28ba4d9f0c09e14528701f341c6a4b15dde260..50c97ed358b8ba3ea687dcca81503a7772e7977f 100644 (file)
@@ -4,7 +4,7 @@
         * 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 &quot;%s&quot;?';
        $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 &quot;%s&quot; from replication set &quot;%s&quot;?';
-       $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 &quot;%s&quot; from replication set &quot;%s&quot;?';
+       $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 &quot;%s&quot; from replication set &quot;%s&quot;?';
-       $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 &quot;%s&quot; from replication set &quot;%s&quot;?';
+       $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';
index 6aed8650f3a42a09951379ec5d9e616fc94ce072..7aad5c56b1ca139d1084fd7d879784ed9174ca23 100755 (executable)
@@ -3,7 +3,7 @@
        /**
         * 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
@@ -17,8 +17,8 @@
                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&amp;{$misc->href}&amp;",
                                'vars'  => array('table' => 'relname', 'schema' => 'nspname'),
                        ),
-                       'remove' => array(
-                               'title' => $lang['strremove'],
+                       'drop' => array(
+                               'title' => $lang['strdrop'],
                                'url'   => "plugin_slony.php?{$misc->href}&amp;action=confirm_drop_table&amp;set_id={$_REQUEST['set_id']}&amp;",
                                '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&amp;{$misc->href}&amp;",
                                'vars'  => array('sequence' => 'seqname', 'schema' => 'nspname'),
                        ),
-                       'remove' => array(
-                               'title' => $lang['strremove'],
+                       'drop' => array(
+                               'title' => $lang['strdrop'],
                                'url'   => "plugin_slony.php?{$misc->href}&amp;action=confirm_drop_sequence&amp;set_id={$_REQUEST['set_id']}&amp;",
                                '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();
index 56280b669d5a501c5efa8fbcabbce03aef407785..d84daef91e0fc5e7acae1b2863bbf3b0652146ec 100644 (file)
--- a/roles.php
+++ b/roles.php
@@ -36,7 +36,7 @@
                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(
index db0a030fffc52b606b070d1df74bedbc21523729..1e3a193b9989ff50e8b03d555fdecc850d432d57 100644 (file)
--- a/users.php
+++ b/users.php
@@ -3,7 +3,7 @@
        /**
         * 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');