From 98bc3fbdd5f4ea54fd493724ae17747e303390d0 Mon Sep 17 00:00:00 2001 From: soranzo Date: Fri, 12 Mar 2004 01:12:08 +0000 Subject: [PATCH] Explain login disallowed in FAQ. Add CACHE and CYCLE parameters in sequence creation. Italian translation fix. --- FAQ | 9 +++++++++ HISTORY | 3 +++ TODO | 1 - classes/database/Postgres.php | 9 +++++++-- lang/english.php | 4 ++-- lang/italian.php | 6 +++--- lang/recoded/english.php | 4 ++-- lang/recoded/italian.php | 6 +++--- sequences.php | 27 +++++++++++++++++++-------- 9 files changed, 48 insertions(+), 21 deletions(-) diff --git a/FAQ b/FAQ index 3ffaa11b..433dbafc 100644 --- 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 Ӓ format! diff --git a/HISTORY b/HISTORY index 5ab218c0..12d634cd 100644 --- 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 dc8fbefe..03d310fe 100644 --- a/TODO +++ b/TODO @@ -54,7 +54,6 @@ Views Sequences --------- -* CACHE and CYCLE options in sequence creation Functions --------- diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php index 5955013d..695d5452 100755 --- a/classes/database/Postgres.php +++ b/classes/database/Postgres.php @@ -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); } diff --git a/lang/english.php b/lang/english.php index 13742035..55cf2a42 100755 --- a/lang/english.php +++ b/lang/english.php @@ -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'; diff --git a/lang/italian.php b/lang/italian.php index b3eeff4a..3d7afe70 100644 --- a/lang/italian.php +++ b/lang/italian.php @@ -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'; diff --git a/lang/recoded/english.php b/lang/recoded/english.php index 6a18fd5f..ffdf3766 100644 --- a/lang/recoded/english.php +++ b/lang/recoded/english.php @@ -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'; diff --git a/lang/recoded/italian.php b/lang/recoded/italian.php index 1204c5e1..8acbe9fd 100644 --- a/lang/recoded/italian.php +++ b/lang/recoded/italian.php @@ -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'; diff --git a/sequences.php b/sequences.php index e092c56d..298e0532 100644 --- a/sequences.php +++ b/sequences.php @@ -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 @@ -148,9 +148,10 @@ 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 "

", $misc->printVal($_REQUEST['database']), ": {$lang['strsequences']} : {$lang['strcreatesequence']}

\n"; $misc->printMsg($msg); @@ -166,10 +167,6 @@ echo " \n"; - echo "{$lang['strstartvalue']}\n"; - echo "\n"; - echo "{$lang['strminvalue']}\n"; echo "\n"; @@ -178,6 +175,18 @@ echo "\n"; + echo "{$lang['strstartvalue']}\n"; + echo "\n"; + + echo "{$lang['strcachevalue']}\n"; + echo "\n"; + + echo "{$lang['striscycled']}\n"; + echo "\n"; + echo "\n"; echo "

\n"; echo $misc->form; @@ -197,8 +206,10 @@ // 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 { -- 2.39.5