Skip to content

Commit a7725b5

Browse files
committed
- Fixes falsy values displayed as NULL (#196).
- Sets correct content type headers when exporting schema to screen output - Simplifies roles and privileges methods - When inserting a new row, check the null input for empty fields that allow null values - Avoid passing SQL query in the query string when inspecting a column - Export form has been extracted to a trait to reduce repetition (most of it is common to tables, views and matviews) - Ensure server, database and table request params gets defined on hidden inputs when browsing a table
1 parent 67149e0 commit a7725b5

File tree

251 files changed

+440
-439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+440
-439
lines changed

.php_cs.cache

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "huasofoundries/phppgadmin6",
3-
"version": "6.0.0-beta.45",
3+
"version": "6.0.0-beta.46",
44
"description": "Like phpmyadmin but for postgres",
55
"type": "project",
66
"license": "MIT",

composer.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/classes/ADONewConnection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin;

src/classes/ADORecordSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin;

src/classes/ADOdbException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin;

src/classes/ArrayRecordSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin;

src/classes/ContainerUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin;

src/classes/Misc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin;

src/classes/PluginManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin;

src/classes/Translations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin;

src/controllers/AcinsertController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/AggregatesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/AlldbController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/BaseController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/BrowserController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/CastsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/ColpropertiesController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/ConstraintsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/ConversionsController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/DatabaseController.php

Lines changed: 29 additions & 29 deletions
Large diffs are not rendered by default.

src/controllers/DataexportController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/DataimportController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;

src/controllers/DbexportController.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* PHPPgAdmin v6.0.0-beta.45
4+
* PHPPgAdmin v6.0.0-beta.46
55
*/
66

77
namespace PHPPgAdmin\Controller;
@@ -46,7 +46,7 @@ public function render()
4646

4747
// Obtain the pg_dump version number and check if the path is good
4848
$version = [];
49-
preg_match('/(\\d+(?:\\.\\d+)?)(?:\\.\\d+)?.*$/', exec($exe . ' --version'), $version);
49+
preg_match('/(\\d+(?:\\.\\d+)?)(?:\\.\\d+)?.*$/', exec($exe.' --version'), $version);
5050

5151
$this->prtrace('$exe', $exe, 'version', $version[1]);
5252

@@ -96,20 +96,20 @@ public function render()
9696
}
9797

9898
// Set environmental variables that pg_dump uses
99-
putenv('PGPASSWORD=' . $server_info['password']);
100-
putenv('PGUSER=' . $server_info['username']);
99+
putenv('PGPASSWORD='.$server_info['password']);
100+
putenv('PGUSER='.$server_info['username']);
101101
$hostname = $server_info['host'];
102102
if (null !== $hostname && '' != $hostname) {
103-
putenv('PGHOST=' . $hostname);
103+
putenv('PGHOST='.$hostname);
104104
}
105105
$port = $server_info['port'];
106106
if (null !== $port && '' != $port) {
107-
putenv('PGPORT=' . $port);
107+
putenv('PGPORT='.$port);
108108
}
109109

110110
// Build command for executing pg_dump. '-i' means ignore version differences.
111111
if (((float) $version[1]) < 9.5) {
112-
$cmd = $exe . ' -i';
112+
$cmd = $exe.' -i';
113113
} else {
114114
$cmd = $exe;
115115
}
@@ -124,7 +124,7 @@ public function render()
124124
switch ($_REQUEST['subject']) {
125125
case 'schema':
126126
// This currently works for 8.2+ (due to the orthoganl -t -n issue introduced then)
127-
$cmd .= ' -n ' . $this->misc->escapeShellArg("\"{$f_schema}\"");
127+
$cmd .= ' -n '.$this->misc->escapeShellArg("\"{$f_schema}\"");
128128

129129
break;
130130
case 'table':
@@ -137,13 +137,13 @@ public function render()
137137
// Starting in 8.2, -n and -t are orthagonal, so we now schema qualify
138138
// the table name in the -t argument and quote both identifiers
139139
if (((float) $version[1]) >= 8.2) {
140-
$cmd .= ' -t ' . $this->misc->escapeShellArg("\"{$f_schema}\".\"{$f_object}\"");
140+
$cmd .= ' -t '.$this->misc->escapeShellArg("\"{$f_schema}\".\"{$f_object}\"");
141141
} else {
142142
// If we are 7.4 or higher, assume they are using 7.4 pg_dump and
143143
// set dump schema as well. Also, mixed case dumping has been fixed
144144
// then..
145-
$cmd .= ' -t ' . $this->misc->escapeShellArg($f_object)
146-
. ' -n ' . $this->misc->escapeShellArg($f_schema);
145+
$cmd .= ' -t '.$this->misc->escapeShellArg($f_object)
146+
.' -n '.$this->misc->escapeShellArg($f_schema);
147147
}
148148
}
149149

@@ -184,7 +184,7 @@ public function render()
184184
}
185185

186186
if (!$dumpall) {
187-
putenv('PGDATABASE=' . $_REQUEST['database']);
187+
putenv('PGDATABASE='.$_REQUEST['database']);
188188
}
189189

190190
/*$this->prtrace(

0 commit comments

Comments
 (0)