';
@@ -553,7 +553,7 @@ class DatabaseController extends BaseController
// Display prepared transactions
if ($data->hasPreparedXacts()) {
- echo "
" . PHP_EOL;
+ echo "
".PHP_EOL;
$prep_xacts = $data->getPreparedXacts($_REQUEST['database']);
$columns = [
@@ -581,7 +581,7 @@ class DatabaseController extends BaseController
}
// Fetch the processes from the database
- echo "
" . PHP_EOL;
+ echo "
".PHP_EOL;
$processes = $data->getProcesses($_REQUEST['database']);
$columns = [
@@ -721,7 +721,7 @@ class DatabaseController extends BaseController
$this->printTrail('database');
$this->printTabs('database', 'locks');
- echo '
';
$this->currentLocks();
@@ -740,27 +740,27 @@ class DatabaseController extends BaseController
$this->printTrail('database');
$this->printTabs('database', 'sql');
- echo "
{$this->lang['strentersql']}
" . PHP_EOL;
- echo '
' . PHP_EOL;
+ echo "
lang['strreset']}\" />".PHP_EOL;
+ echo ''.PHP_EOL;
// Default focus
$this->setFocus('forms[0].query');
diff --git a/src/controllers/DataexportController.php b/src/controllers/DataexportController.php
index 5a14c505..4b55af34 100644
--- a/src/controllers/DataexportController.php
+++ b/src/controllers/DataexportController.php
@@ -1,7 +1,7 @@
prtrace('$exe', $exe, 'version', $version[1]);
@@ -97,20 +97,20 @@ class DbexportController extends BaseController
}
// Set environmental variables that pg_dump uses
- putenv('PGPASSWORD=' . $server_info['password']);
- putenv('PGUSER=' . $server_info['username']);
+ putenv('PGPASSWORD='.$server_info['password']);
+ putenv('PGUSER='.$server_info['username']);
$hostname = $server_info['host'];
if (null !== $hostname && '' != $hostname) {
- putenv('PGHOST=' . $hostname);
+ putenv('PGHOST='.$hostname);
}
$port = $server_info['port'];
if (null !== $port && '' != $port) {
- putenv('PGPORT=' . $port);
+ putenv('PGPORT='.$port);
}
// Build command for executing pg_dump. '-i' means ignore version differences.
if (((float) $version[1]) < 9.5) {
- $cmd = $exe . ' -i';
+ $cmd = $exe.' -i';
} else {
$cmd = $exe;
}
@@ -125,7 +125,7 @@ class DbexportController extends BaseController
switch ($_REQUEST['subject']) {
case 'schema':
// This currently works for 8.2+ (due to the orthoganl -t -n issue introduced then)
- $cmd .= ' -n ' . $this->misc->escapeShellArg("\"{$f_schema}\"");
+ $cmd .= ' -n '.$this->misc->escapeShellArg("\"{$f_schema}\"");
break;
case 'table':
@@ -138,13 +138,13 @@ class DbexportController extends BaseController
// Starting in 8.2, -n and -t are orthagonal, so we now schema qualify
// the table name in the -t argument and quote both identifiers
if (((float) $version[1]) >= 8.2) {
- $cmd .= ' -t ' . $this->misc->escapeShellArg("\"{$f_schema}\".\"{$f_object}\"");
+ $cmd .= ' -t '.$this->misc->escapeShellArg("\"{$f_schema}\".\"{$f_object}\"");
} else {
// If we are 7.4 or higher, assume they are using 7.4 pg_dump and
// set dump schema as well. Also, mixed case dumping has been fixed
// then..
- $cmd .= ' -t ' . $this->misc->escapeShellArg($f_object)
- . ' -n ' . $this->misc->escapeShellArg($f_schema);
+ $cmd .= ' -t '.$this->misc->escapeShellArg($f_object)
+ .' -n '.$this->misc->escapeShellArg($f_schema);
}
}
@@ -185,7 +185,7 @@ class DbexportController extends BaseController
}
if (!$dumpall) {
- putenv('PGDATABASE=' . $_REQUEST['database']);
+ putenv('PGDATABASE='.$_REQUEST['database']);
} else {
//$cmd .= ' --no-role-password';
putenv('PGDATABASE');
diff --git a/src/controllers/DisplayController.php b/src/controllers/DisplayController.php
index 1a2e8bfa..eefeae75 100644
--- a/src/controllers/DisplayController.php
+++ b/src/controllers/DisplayController.php
@@ -1,7 +1,7 @@
conn->ErrorNo();
}
- if ($rs->RecordCount() == 0) {
+ if ($rs->recordCount() == 0) {
return -1;
}
diff --git a/src/database/Connection.php b/src/database/Connection.php
index a18cdd93..67630acd 100644
--- a/src/database/Connection.php
+++ b/src/database/Connection.php
@@ -1,7 +1,7 @@
selectSet($sql);
- if ($rs->RecordCount() != sizeof($atts)) {
+ if ($rs->recordCount() != sizeof($atts)) {
return -2;
}
diff --git a/src/database/Postgres10.php b/src/database/Postgres10.php
index ae1c62a5..1af7d5f4 100644
--- a/src/database/Postgres10.php
+++ b/src/database/Postgres10.php
@@ -1,7 +1,7 @@
RecordCount() and ($rs->fields['vacrelid'] == $toid)) {
+ if ($rs->recordCount() and ($rs->fields['vacrelid'] == $toid)) {
// table exists in pg_autovacuum, UPDATE
$sql = sprintf(
"UPDATE \"pg_catalog\".\"pg_autovacuum\" SET
diff --git a/src/database/Postgres82.php b/src/database/Postgres82.php
index c83208f5..65bb8563 100644
--- a/src/database/Postgres82.php
+++ b/src/database/Postgres82.php
@@ -1,7 +1,7 @@
RecordCount() and ($rs->fields['vacrelid'] == $toid)) {
+ if ($rs->recordCount() and ($rs->fields['vacrelid'] == $toid)) {
// table exists in pg_autovacuum, UPDATE
$sql = sprintf(
"UPDATE \"pg_catalog\".\"pg_autovacuum\" SET
diff --git a/src/database/Postgres84.php b/src/database/Postgres84.php
index aed669a5..25e0e09c 100644
--- a/src/database/Postgres84.php
+++ b/src/database/Postgres84.php
@@ -1,7 +1,7 @@
arrayClean($definition);
- $sql .= "'" . $definition[0] . "'";
+ $sql .= "'".$definition[0]."'";
if ($definition[1]) {
- $sql .= ",'" . $definition[1] . "'";
+ $sql .= ",'".$definition[1]."'";
}
} else {
$this->clean($definition);
- $sql .= "'" . $definition . "'";
+ $sql .= "'".$definition."'";
}
$sql .= " LANGUAGE \"{$language}\"";
diff --git a/src/database/databasetraits/HasTrait.php b/src/database/databasetraits/HasTrait.php
index 8df8afbe..491fc95a 100644
--- a/src/database/databasetraits/HasTrait.php
+++ b/src/database/databasetraits/HasTrait.php
@@ -1,7 +1,7 @@
selectSet($sql);
- return !($v->RecordCount() == 0);
+ return !($v->recordCount() == 0);
}
/**
diff --git a/src/database/databasetraits/OperatorTrait.php b/src/database/databasetraits/OperatorTrait.php
index 7f82b25f..cb0c3708 100644
--- a/src/database/databasetraits/OperatorTrait.php
+++ b/src/database/databasetraits/OperatorTrait.php
@@ -1,7 +1,7 @@
0) {
- $sql .= ' IN ROLE "' . join('", "', $new_roles_to_add) . '"';
+ $sql .= ' IN ROLE "'.join('", "', $new_roles_to_add).'"';
}
if (is_array($new_members_of_role) && sizeof($new_members_of_role) > 0) {
- $sql .= ' ROLE "' . join('", "', $new_members_of_role) . '"';
+ $sql .= ' ROLE "'.join('", "', $new_members_of_role).'"';
}
if (is_array($new_admins_of_role) && sizeof($new_admins_of_role) > 0) {
- $sql .= ' ADMIN "' . join('", "', $new_admins_of_role) . '"';
+ $sql .= ' ADMIN "'.join('", "', $new_admins_of_role).'"';
}
return $this->execute($sql);
@@ -209,7 +209,7 @@ trait RoleTrait
*/
public function _encryptPassword($username, $password)
{
- return 'md5' . md5($password . $username);
+ return 'md5'.md5($password.$username);
}
/**
@@ -590,7 +590,7 @@ trait RoleTrait
$sql .= $createdb ? ' CREATEDB' : ' NOCREATEDB';
$sql .= $createuser ? ' CREATEUSER' : ' NOCREATEUSER';
if (is_array($groups) && sizeof($groups) > 0) {
- $sql .= ' IN GROUP "' . join('", "', $groups) . '"';
+ $sql .= ' IN GROUP "'.join('", "', $groups).'"';
}
if ($expiry != '') {
@@ -859,7 +859,7 @@ trait RoleTrait
if (is_array($users) && sizeof($users) > 0) {
$this->fieldArrayClean($users);
- $sql .= ' WITH USER "' . join('", "', $users) . '"';
+ $sql .= ' WITH USER "'.join('", "', $users).'"';
}
return $this->execute($sql);
diff --git a/src/database/databasetraits/RowTrait.php b/src/database/databasetraits/RowTrait.php
index bd3ebe9e..11fd453c 100644
--- a/src/database/databasetraits/RowTrait.php
+++ b/src/database/databasetraits/RowTrait.php
@@ -1,7 +1,7 @@
RecordCount() == 0) {
+ if ($rs->recordCount() == 0) {
// Check for OID column
$temp = [];
if ($this->hasObjectID($table)) {
diff --git a/src/database/databasetraits/SchemaTrait.php b/src/database/databasetraits/SchemaTrait.php
index c280918b..f28926d4 100644
--- a/src/database/databasetraits/SchemaTrait.php
+++ b/src/database/databasetraits/SchemaTrait.php
@@ -1,7 +1,7 @@
getSequence($sequence);
- if ($seq->RecordCount() != 1) {
+ if ($seq->recordCount() != 1) {
return -1;
}
@@ -253,7 +253,7 @@ trait SequenceTrait
$data = $this->getSequence($sequence);
- if ($data->RecordCount() != 1) {
+ if ($data->recordCount() != 1) {
return -2;
}
diff --git a/src/database/databasetraits/StatsTrait.php b/src/database/databasetraits/StatsTrait.php
index 8eec79f1..e753bf3b 100644
--- a/src/database/databasetraits/StatsTrait.php
+++ b/src/database/databasetraits/StatsTrait.php
@@ -1,7 +1,7 @@
getTable($table);
- if (!is_object($t) || $t->RecordCount() != 1) {
+ if (!is_object($t) || $t->recordCount() != 1) {
$this->rollbackTransaction();
return null;
@@ -182,7 +182,7 @@ trait TableTrait
// Output all table columns
$col_comments_sql = ''; // Accumulate comments on columns
- $num = $atts->RecordCount() + $cons->RecordCount();
+ $num = $atts->recordCount() + $cons->recordCount();
$i = 1;
$sql = $this->_dumpSerials($atts, $t, $sql, $col_comments_sql, $i, $num);
@@ -205,7 +205,7 @@ trait TableTrait
* as inherited NOT NULL and CHECK constraints. So for the time being, we just do
* not claim to support inheritance.
* $parents = $this->getTableParents($table);
- * if ($parents->RecordCount() > 0) {
+ * if ($parents->recordCount() > 0) {
* $sql .= " INHERITS (";
* while (!$parents->EOF) {
* $this->fieldClean($parents->fields['relname']);
@@ -798,7 +798,7 @@ trait TableTrait
AND relnamespace = (SELECT oid FROM pg_catalog.pg_namespace WHERE nspname='{$c_schema}')";
$rs = $this->selectSet($sql);
- if ($rs->RecordCount() != 1) {
+ if ($rs->recordCount() != 1) {
return null;
}
@@ -827,7 +827,7 @@ trait TableTrait
return null;
}
- if ($indexes->RecordCount() > 0) {
+ if ($indexes->recordCount() > 0) {
$sql .= "\n-- Indexes\n\n";
while (!$indexes->EOF) {
$sql .= $indexes->fields['inddef'].";\n";
@@ -844,7 +844,7 @@ trait TableTrait
return null;
}
- if ($triggers->RecordCount() > 0) {
+ if ($triggers->recordCount() > 0) {
$sql .= "\n-- Triggers\n\n";
while (!$triggers->EOF) {
$sql .= $triggers->fields['tgdef'];
@@ -862,7 +862,7 @@ trait TableTrait
return null;
}
- if ($rules->RecordCount() > 0) {
+ if ($rules->recordCount() > 0) {
$sql .= "\n-- Rules\n\n";
while (!$rules->EOF) {
$sql .= $rules->fields['definition']."\n";
@@ -1216,7 +1216,7 @@ trait TableTrait
{
$data = $this->getTable($table);
- if ($data->RecordCount() != 1) {
+ if ($data->recordCount() != 1) {
return -2;
}
diff --git a/src/database/databasetraits/TablespaceTrait.php b/src/database/databasetraits/TablespaceTrait.php
index 5e5a757c..8d258543 100644
--- a/src/database/databasetraits/TablespaceTrait.php
+++ b/src/database/databasetraits/TablespaceTrait.php
@@ -1,7 +1,7 @@
getView($view);
- if ($data->RecordCount() != 1) {
+ if ($data->recordCount() != 1) {
return -2;
}
diff --git a/src/decorators/ActionUrlDecorator.php b/src/decorators/ActionUrlDecorator.php
index f8ec2032..c425d18a 100644
--- a/src/decorators/ActionUrlDecorator.php
+++ b/src/decorators/ActionUrlDecorator.php
@@ -1,7 +1,7 @@
printTable($autovac, $columns, $actions, 'admin-admin', $this->lang['strnovacuumconf']);
- if (('table' == $type) and (0 == $autovac->RecordCount())) {
+ if (('table' == $type) and (0 == $autovac->recordCount())) {
echo '
';
echo '
misc->href}&table=";
diff --git a/src/traits/ExportTrait.php b/src/traits/ExportTrait.php
index 0b05786b..4a5987ad 100644
--- a/src/traits/ExportTrait.php
+++ b/src/traits/ExportTrait.php
@@ -1,7 +1,7 @@
';
- $content .= ' ';
+ $content .= ' ';
$content .= ' ';
$content .= sprintf(
- '%s %s', $this->lang['strdataonly'],
- PHP_EOL);
+ '
%s %s',
+ $this->lang['strdataonly'],
+ PHP_EOL
+ );
$content .= sprintf(
- '
%s %s', $this->lang['strformat'],
- PHP_EOL);
- $content .= '
' . PHP_EOL;
- $content .= 'COPY ' . PHP_EOL;
- $content .= 'SQL ' . PHP_EOL;
+ '%s %s',
+ $this->lang['strformat'],
+ PHP_EOL
+ );
+ $content .= ''.PHP_EOL;
+ $content .= 'COPY '.PHP_EOL;
+ $content .= 'SQL '.PHP_EOL;
if (!$onlyCopyAndSQL) {
- $content .= 'CSV ' . PHP_EOL;
- $content .= "{$this->lang['strtabbed']} " . PHP_EOL;
- $content .= 'XHTML ' . PHP_EOL;
- $content .= 'XML ' . PHP_EOL;
+ $content .= 'CSV '.PHP_EOL;
+ $content .= "{$this->lang['strtabbed']} ".PHP_EOL;
+ $content .= 'XHTML '.PHP_EOL;
+ $content .= 'XML '.PHP_EOL;
}
$content .= sprintf(
' %s %s%s',
PHP_EOL,
PHP_EOL,
- PHP_EOL);
+ PHP_EOL
+ );
if ($hasID) {
$content .= sprintf(
- '%s ', $this->lang['stroids']);
+ '%s ',
+ $this->lang['stroids']
+ );
$content .= sprintf(
' %s %s',
PHP_EOL,
- PHP_EOL);
+ PHP_EOL
+ );
}
return $content;
@@ -72,36 +80,47 @@ trait ExportTrait
public function structureAndData($hasID)
{
$content = '';
- $content .= '';
+ $content .= ' ';
$content .= ' ';
$content .= sprintf(
- '%s %s', $this->lang['strstructureanddata'],
- PHP_EOL);
+ '%s %s',
+ $this->lang['strstructureanddata'],
+ PHP_EOL
+ );
$content .= sprintf(
- '%s %s', $this->lang['strformat'],
- PHP_EOL);
- $content .= '' . PHP_EOL;
- $content .= 'COPY ' . PHP_EOL;
- $content .= 'SQL ' . PHP_EOL;
+ '%s %s',
+ $this->lang['strformat'],
+ PHP_EOL
+ );
+ $content .= ''.PHP_EOL;
+ $content .= 'COPY '.PHP_EOL;
+ $content .= 'SQL '.PHP_EOL;
$content .= sprintf(
' %s %s %s',
PHP_EOL,
PHP_EOL,
- PHP_EOL);
+ PHP_EOL
+ );
$content .= sprintf(
- '%s ', $this->lang['strdrop']);
+ '%s ',
+ $this->lang['strdrop']
+ );
$content .= sprintf(
' %s %s',
PHP_EOL,
- PHP_EOL);
+ PHP_EOL
+ );
if ($hasID) {
$content .= sprintf(
- '%s ', $this->lang['stroids']);
+ '%s ',
+ $this->lang['stroids']
+ );
$content .= sprintf(
' %s %s',
PHP_EOL,
- PHP_EOL);
+ PHP_EOL
+ );
}
return $content;
@@ -119,16 +138,23 @@ trait ExportTrait
{
$content = '';
$content .= sprintf(
- ' ', $checked ? 'checked="checked"' : '');
+ ' ',
+ $checked ? 'checked="checked"' : ''
+ );
$content .= sprintf(
- '%s ', $this->lang['strstructureonly'],
- PHP_EOL);
+ '%s ',
+ $this->lang['strstructureonly'],
+ PHP_EOL
+ );
$content .= sprintf(
- '%s ', $this->lang['strdrop']);
+ '%s ',
+ $this->lang['strdrop']
+ );
$content .= sprintf(
' %s %s',
PHP_EOL,
- PHP_EOL);
+ PHP_EOL
+ );
return $content;
}
@@ -143,14 +169,21 @@ trait ExportTrait
public function formHeader($endpoint = 'dataexport')
{
$content = sprintf(
- '%s', \SUBFOLDER . '/src/views', $endpoint,
- PHP_EOL);
- $content .= '' . PHP_EOL;
+ '%s',
+ \SUBFOLDER.'/src/views',
+ $endpoint,
+ PHP_EOL
+ );
+ $content .= ''.PHP_EOL;
$content .= sprintf(
- '%s ', $this->lang['strformat']);
+ '%s ',
+ $this->lang['strformat']
+ );
$content .= sprintf(
- '%s %s', $this->lang['stroptions'],
- PHP_EOL);
+ '%s %s',
+ $this->lang['stroptions'],
+ PHP_EOL
+ );
return $content;
}
@@ -165,24 +198,29 @@ trait ExportTrait
*/
public function formFooter($subject, $object)
{
- $content = ' ' . PHP_EOL;
+ $content = '
'.PHP_EOL;
$content .= $this->misc->form;
$content .= sprintf(
' %s',
$subject,
- PHP_EOL);
+ PHP_EOL
+ );
$content .= sprintf(
' ',
- $subject, htmlspecialchars($object),
- PHP_EOL);
+ $subject,
+ htmlspecialchars($object),
+ PHP_EOL
+ );
$content .= sprintf(
'
%s',
$this->lang['strexport'],
- PHP_EOL);
+ PHP_EOL
+ );
$content .= sprintf(
'%s',
- PHP_EOL);
+ PHP_EOL
+ );
return $content;
}
@@ -198,37 +236,49 @@ trait ExportTrait
{
$content = sprintf(
'
%s',
- PHP_EOL);
+ PHP_EOL
+ );
$content .= sprintf(
- '%s %s', $this->lang['stroptions'],
- PHP_EOL);
+ '%s %s',
+ $this->lang['stroptions'],
+ PHP_EOL
+ );
$content .= ' ';
$content .= sprintf(
- '%s ', $this->lang['strshow'],
- PHP_EOL);
+ '%s ',
+ $this->lang['strshow'],
+ PHP_EOL
+ );
$content .= ' ';
$content .= sprintf(
- '%s ', $this->lang['strdownload']);
+ '%s ',
+ $this->lang['strdownload']
+ );
if ($offerGzip) {
$content .= ' ';
$content .= sprintf(
- '%s %s', $this->lang['strdownloadgzipped'],
- PHP_EOL);
+ '%s %s',
+ $this->lang['strdownloadgzipped'],
+ PHP_EOL
+ );
}
$content .= sprintf(
'
%s',
- PHP_EOL);
+ PHP_EOL
+ );
return $content;
}
/**
* Offers the option of export database without user credentials. When running in Amazon RDS this is the workaround
- * to make pg_dumpall work at all
+ * to make pg_dumpall work at all.
+ *
*
+ * @param mixed $version10orMore
*
- * @return string the html of the options snipper
+ * @return string the html of the options snipper
*/
public function offerNoRoleExport($version10orMore)
{
@@ -236,25 +286,31 @@ trait ExportTrait
if (!$version10orMore) {
return '';
}
- $content = '' . PHP_EOL;
+ $content = ' '.PHP_EOL;
$content .= sprintf(
' %s  %s',
PHP_EOL,
- PHP_EOL);
+ PHP_EOL
+ );
$content .= sprintf(
'%s%s %s %s',
PHP_EOL,
- 'Use the option below if your platform prevents dumping DBs', 'with role info (e.g. Amazon RDS)',
- PHP_EOL);
+ 'Use the option below if your platform prevents dumping DBs',
+ 'with role info (e.g. Amazon RDS)',
+ PHP_EOL
+ );
$content .= sprintf(
'%s%s ?> %s',
- PHP_EOL, 'Avoid dumping roles',
+ PHP_EOL,
+ 'Avoid dumping roles',
'https://www.postgresql.org/docs/10/app-pg-dumpall.html',
- PHP_EOL);
+ PHP_EOL
+ );
$content .= sprintf(
' %s %s',
PHP_EOL,
- PHP_EOL);
+ PHP_EOL
+ );
return $content;
}
diff --git a/src/traits/FormTrait.php b/src/traits/FormTrait.php
index bb8a1486..6e9aba6c 100644
--- a/src/traits/FormTrait.php
+++ b/src/traits/FormTrait.php
@@ -1,7 +1,7 @@
RecordCount() <= 0) {
+ if ($set->recordCount() <= 0) {
return $result;
}
while (!$set->EOF) {
diff --git a/src/traits/InsertEditRowTrait.php b/src/traits/InsertEditRowTrait.php
index 78ad0ab8..bc098b09 100644
--- a/src/traits/InsertEditRowTrait.php
+++ b/src/traits/InsertEditRowTrait.php
@@ -1,7 +1,7 @@
misc->getDatabaseAccessor();
$databases = $data->getDatabases();
- if ($databases->RecordCount() > 0) {
+ if ($databases->recordCount() > 0) {
$connection_html .= '';
$connection_html .= $this->misc->printHelp($this->lang['strdatabase'], 'pg.database', false);
$connection_html .= ": ".PHP_EOL;
diff --git a/src/traits/ViewsMatViewsPropertiesTrait.php b/src/traits/ViewsMatViewsPropertiesTrait.php
index 2fe984a9..415be999 100644
--- a/src/traits/ViewsMatViewsPropertiesTrait.php
+++ b/src/traits/ViewsMatViewsPropertiesTrait.php
@@ -1,7 +1,7 @@
printTabs($this->subject, 'definition');
$this->printMsg($msg);
- if ($vdata->RecordCount() > 0) {
+ if ($vdata->recordCount() > 0) {
// Show comment if any
if (null !== $vdata->fields['relcomment']) {
echo ''.PHP_EOL;
diff --git a/src/traits/ViewsMatviewsTrait.php b/src/traits/ViewsMatviewsTrait.php
index 779e0c8d..08df0532 100644
--- a/src/traits/ViewsMatviewsTrait.php
+++ b/src/traits/ViewsMatviewsTrait.php
@@ -1,7 +1,7 @@