Explain login disallowed in FAQ. Add CACHE and CYCLE parameters in sequence creation...
authorsoranzo <soranzo>
Fri, 12 Mar 2004 01:12:08 +0000 (01:12 +0000)
committersoranzo <soranzo>
Fri, 12 Mar 2004 01:12:08 +0000 (01:12 +0000)
FAQ
HISTORY
TODO
classes/database/Postgres.php
lang/english.php
lang/italian.php
lang/recoded/english.php
lang/recoded/italian.php
sequences.php

diff --git a/FAQ b/FAQ
index 3ffaa11be5bc24de4e1f3e674c434eafb88c2fd8..433dbafc014afe62051d54530f6940b3d3c80c00 100644 (file)
--- a/FAQ
+++ b/FAQ
@@ -57,6 +57,15 @@ A: PostgreSQL, by default, runs in trust mode.  That means that it doesn't
    to enter a password to start PostgreSQL.  Get around this by using a
    .pgpass file - explained in the PostgreSQL documentation.
 
+Q: For some users I get a "Login disallowed for security" message.
+
+A: Logins via phpPgAdmin with no password or certain usernames (pgsql,
+   postgres, root, administrator) are denied by default. Before changing this
+   behaviour (setting $conf['extra_login_security'] to false in the
+   config.inc.php file) please read the PostgreSQL documentation about client
+   authentication and understand how to change PostgreSQL's pg_hba.conf to
+   enable passworded local connections.
+
 Q: When I enter non-ASCII data into the database via a form, it's inserted
    as hexadecimal or &#1234; format!
 
diff --git a/HISTORY b/HISTORY
index 5ab218c08f4797a467ea55aa294de2bd17eab254..12d634cd5597f062e62cf8131b5d830be98748a0 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -4,6 +4,9 @@ phpPgAdmin History
 Version 3.4-dev
 -----------
 
+Features
+* Add CACHE and CYCLE parameters in sequence creation
+
 Bugs
 * Fix table stats for <= 7.2
 
diff --git a/TODO b/TODO
index dc8fbefef617c242f451696fa1986f5020849521..03d310fe286e662127f10c5f4c0c616f66c7eecb 100644 (file)
--- a/TODO
+++ b/TODO
@@ -54,7 +54,6 @@ Views
 Sequences
 ---------
 
-* CACHE and CYCLE options in sequence creation
 
 Functions
 ---------
index 5955013dbad9f4bf5ca74896d4c3cc7e3891df57..695d5452162e885f766f040849580e5658844dd1 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.184 2004/03/06 11:30:00 chriskl Exp $
+ * $Id: Postgres.php,v 1.185 2004/03/12 01:12:09 soranzo Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -1490,20 +1490,25 @@ class Postgres extends BaseDB {
         * @param $minvalue The min value
         * @param $maxvalue The max value
         * @param $startvalue The starting value
+        * @param $cachevalue The cache value
+        * @param $cycledvalue True if cycled, false otherwise
         * @return 0 success
         */
-       function createSequence($sequence, $increment, $minvalue, $maxvalue, $startvalue) {
+       function createSequence($sequence, $increment, $minvalue, $maxvalue, $startvalue, $cachevalue, $cycledvalue) {
                $this->fieldClean($sequence);
                $this->clean($increment);
                $this->clean($minvalue);
                $this->clean($maxvalue);
                $this->clean($startvalue);
+               $this->clean($cachevalue);
                
                $sql = "CREATE SEQUENCE \"{$sequence}\"";
                if ($increment != '') $sql .= " INCREMENT {$increment}";
                if ($minvalue != '') $sql .= " MINVALUE {$minvalue}";
                if ($maxvalue != '') $sql .= " MAXVALUE {$maxvalue}";
                if ($startvalue != '') $sql .= " START {$startvalue}";
+               if ($cachevalue != '') $sql .= " CACHE {$cachevalue}";
+               if ($cycledvalue) $sql .= " CYCLE";
                
                return $this->execute($sql);
        }
index 13742035272c0ec87e056ee0bbd9eebeb72e3a4d..55cf2a42dd12c30f281154b1c14a0141c6cd54d4 100755 (executable)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.133 2004/02/17 00:12:11 soranzo Exp $
+        * $Id: english.php,v 1.134 2004/03/12 01:12:11 soranzo Exp $
         */
 
        // Language and character set
@@ -26,7 +26,7 @@
        // Basic strings
        $lang['strlogin'] = 'Login';
        $lang['strloginfailed'] = 'Login failed';
-       $lang['strlogindisallowed'] = 'Login disallowed';
+       $lang['strlogindisallowed'] = 'Login disallowed for security';
        $lang['strserver'] = 'Server';
        $lang['strlogout'] = 'Logout';
        $lang['strowner'] = 'Owner';
index b3eeff4a1bee0a23a73ab739ab6a3684186b8e7f..3d7afe7047d775d9382d44de64f3dbcc9817cea1 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.27 2004/02/17 01:10:06 soranzo Exp $
+        * $Id: italian.php,v 1.28 2004/03/12 01:12:11 soranzo Exp $
         */
 
        // Language and character set - Lingua e set di caratteri
@@ -26,7 +26,7 @@
        // Basic strings - Stringhe basilari
        $lang['strlogin'] = 'Login';
        $lang['strloginfailed'] = 'Login fallito';
-       $lang['strlogindisallowed'] = 'Login disabilitato';
+       $lang['strlogindisallowed'] = 'Login disabilitato per questione di sicurezza';
        $lang['strserver'] = 'Server';
        $lang['strlogout'] = 'Logout';
        $lang['strowner'] = 'Proprietario';
@@ -297,7 +297,7 @@ $lang['strviewconditions'] = 'Additional Conditions';
         $lang['strnosequence'] = 'Sequenza non trovata.';
         $lang['strnosequences'] = 'Nessuna sequenza trovata.';
        $lang['strcreatesequence'] = 'Crea sequenza';
-       $lang['strlastvalue'] = 'Valore precedente';
+       $lang['strlastvalue'] = 'Ultimo valore';
        $lang['strincrementby'] = 'Incrementa di';
        $lang['strstartvalue'] = 'Valore iniziale';
        $lang['strmaxvalue'] = 'Valore massimo';
index 6a18fd5f77dc39b684e3140e856421e224ce64f4..ffdf3766761a47411ffb7c416f1d0fa109375143 100644 (file)
@@ -4,7 +4,7 @@
         * English language file for phpPgAdmin.  Use this as a basis
         * for new translations.
         *
-        * $Id: english.php,v 1.86 2004/02/17 01:10:06 soranzo Exp $
+        * $Id: english.php,v 1.87 2004/03/12 01:12:11 soranzo Exp $
         */
 
        // Language and character set
@@ -26,7 +26,7 @@
        // Basic strings
        $lang['strlogin'] = 'Login';
        $lang['strloginfailed'] = 'Login failed';
-       $lang['strlogindisallowed'] = 'Login disallowed';
+       $lang['strlogindisallowed'] = 'Login disallowed for security';
        $lang['strserver'] = 'Server';
        $lang['strlogout'] = 'Logout';
        $lang['strowner'] = 'Owner';
index 1204c5e188db78f3822bf011e696512be3570ae9..8acbe9fd9f2615991d6d4bfee8961040f180c90b 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.22 2004/02/17 01:10:06 soranzo Exp $
+        * $Id: italian.php,v 1.23 2004/03/12 01:12:11 soranzo Exp $
         */
 
        // Language and character set - Lingua e set di caratteri
@@ -26,7 +26,7 @@
        // Basic strings - Stringhe basilari
        $lang['strlogin'] = 'Login';
        $lang['strloginfailed'] = 'Login fallito';
-       $lang['strlogindisallowed'] = 'Login disabilitato';
+       $lang['strlogindisallowed'] = 'Login disabilitato per questione di sicurezza';
        $lang['strserver'] = 'Server';
        $lang['strlogout'] = 'Logout';
        $lang['strowner'] = 'Proprietario';
@@ -297,7 +297,7 @@ $lang['strviewconditions'] = 'Additional Conditions';
         $lang['strnosequence'] = 'Sequenza non trovata.';
         $lang['strnosequences'] = 'Nessuna sequenza trovata.';
        $lang['strcreatesequence'] = 'Crea sequenza';
-       $lang['strlastvalue'] = 'Valore precedente';
+       $lang['strlastvalue'] = 'Ultimo valore';
        $lang['strincrementby'] = 'Incrementa di';
        $lang['strstartvalue'] = 'Valore iniziale';
        $lang['strmaxvalue'] = 'Valore massimo';
index e092c56ddfae9da06d90911c29da695f4c9664c0..298e053275f67714ae978f7fe85945e608c56cc3 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Manage sequences in a database
         *
-        * $Id: sequences.php,v 1.17 2003/12/30 03:09:29 chriskl Exp $
+        * $Id: sequences.php,v 1.18 2004/03/12 01:12:09 soranzo Exp $
         */
        
        // Include application functions
                
                if (!isset($_POST['formSequenceName'])) $_POST['formSequenceName'] = '';
                if (!isset($_POST['formIncrement'])) $_POST['formIncrement'] = '';
-               if (!isset($_POST['formStartValue'])) $_POST['formStartValue'] = '';
                if (!isset($_POST['formMinValue'])) $_POST['formMinValue'] = '';
                if (!isset($_POST['formMaxValue'])) $_POST['formMaxValue'] = '';
+               if (!isset($_POST['formStartValue'])) $_POST['formStartValue'] = '';
+               if (!isset($_POST['formCacheValue'])) $_POST['formCacheValue'] = '';
                
                echo "<h2>", $misc->printVal($_REQUEST['database']), ": {$lang['strsequences']} : {$lang['strcreatesequence']} </h2>\n";
                $misc->printMsg($msg);
                echo "<td class=\"data1\"><input name=\"formIncrement\" size=\"5\" value=\"",
                        htmlspecialchars($_POST['formIncrement']), "\" /> </td></tr>\n";
                
-               echo "<tr><th class=\"data left\">{$lang['strstartvalue']}</th>\n";
-               echo "<td class=\"data1\"><input name=\"formStartValue\" size=\"5\" value=\"",
-                       htmlspecialchars($_POST['formStartValue']), "\" /></td></tr>\n";
-               
                echo "<tr><th class=\"data left\">{$lang['strminvalue']}</th>\n";
                echo "<td class=\"data1\"><input name=\"formMinValue\" size=\"5\" value=\"",
                        htmlspecialchars($_POST['formMinValue']), "\" /></td></tr>\n";
                echo "<td class=\"data1\"><input name=\"formMaxValue\" size=\"5\" value=\"",
                        htmlspecialchars($_POST['formMaxValue']), "\" /></td></tr>\n";
                
+               echo "<tr><th class=\"data left\">{$lang['strstartvalue']}</th>\n";
+               echo "<td class=\"data1\"><input name=\"formStartValue\" size=\"5\" value=\"",
+                       htmlspecialchars($_POST['formStartValue']), "\" /></td></tr>\n";
+               
+               echo "<tr><th class=\"data left\">{$lang['strcachevalue']}</th>\n";
+               echo "<td class=\"data1\"><input name=\"formCacheValue\" size=\"5\" value=\"",
+                       htmlspecialchars($_POST['formCacheValue']), "\" /></td></tr>\n";
+               
+               echo "<tr><th class=\"data left\">{$lang['striscycled']}</th>\n";
+               echo "<td class=\"data1\"><input type=\"checkbox\" name=\"formCycledValue\" value=\"",
+                       (isset($_POST['formCycledValue']) ? ' checked="checked"' : ''), "\" /></td></tr>\n";
+               
                echo "</table>\n";
                echo "<p><input type=\"hidden\" name=\"action\" value=\"save_create_sequence\" />\n";
                echo $misc->form;
                // Check that they've given a name and at least one column
                if ($_POST['formSequenceName'] == '') doCreateSequence($lang['strsequenceneedsname']);
                else {
-                       $status = $data->createSequence($_POST['formSequenceName'], $_POST['formIncrement'],
-                                                       $_POST['formMinValue'], $_POST['formMaxValue'], $_POST['formStartValue']);
+                       $status = $data->createSequence($_POST['formSequenceName'],
+                               $_POST['formIncrement'], $_POST['formMinValue'],
+                               $_POST['formMaxValue'], $_POST['formStartValue'],
+                               $_POST['formCacheValue'], isset($_POST['formCycledValue']));
                        if ($status == 0) {
                                doDefault($lang['strsequencecreated']);
                        } else {