diff -urNpa phpPgAdmin-5.2-dev/all_db.php phpPgAdmin/all_db.php --- phpPgAdmin-5.2-dev/all_db.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/all_db.php 2018-04-14 21:44:40.193268755 +0000 @@ -193,16 +193,17 @@ } echo "\t\t\t\n"; echo "\t\t\n\t\n"; - + // ENCODING echo "\t\n\t\t{$lang['strencoding']}\n"; echo "\t\t\n"; echo "\t\t\t\n"; echo "\t\t\n\t\n"; diff -urNpa phpPgAdmin-5.2-dev/classes/ArrayRecordSet.php phpPgAdmin/classes/ArrayRecordSet.php --- phpPgAdmin-5.2-dev/classes/ArrayRecordSet.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/ArrayRecordSet.php 2018-04-14 21:37:08.506273841 +0000 @@ -12,7 +12,7 @@ class ArrayRecordSet { var $EOF = false; var $fields; - function ArrayRecordSet($data) { + function __construct($data) { $this->_array = $data; $this->_count = count($this->_array); $this->fields = reset($this->_array); diff -urNpa phpPgAdmin-5.2-dev/classes/class.select.php phpPgAdmin/classes/class.select.php --- phpPgAdmin-5.2-dev/classes/class.select.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/class.select.php 2018-04-14 21:46:29.154267529 +0000 @@ -24,7 +24,7 @@ class XHtmlSimpleElement { * derived class * */ - function XHtmlSimpleElement($element = null) { + function __construct($element = null) { $this->_element = $this->is_element(); @@ -93,8 +93,8 @@ class XHtmlElement extends XHtmlSimpleEl var $_htmlcode = ""; var $_siblings = array(); - function XHtmlElement($text = null) { - XHtmlSimpleElement::XHtmlSimpleElement(); + function __construct($text = null) { + parent::__construct(); if ($text) $this->set_text($text); } @@ -159,8 +159,8 @@ class XHtmlElement extends XHtmlSimpleEl } class XHTML_Button extends XHtmlElement { - function XHTML_Button ($name, $text = null) { - parent::XHtmlElement(); + function __construct($name, $text = null) { + parent::__construct(); $this->set_attribute("name", $name); @@ -170,8 +170,8 @@ class XHTML_Button extends XHtmlElement class XHTML_Option extends XHtmlElement { - function XHTML_Option($text, $value = null) { - XHtmlElement::XHtmlElement(null); + function __construct($text, $value = null) { + parent::__construct(null); $this->set_text($text); } } @@ -180,8 +180,8 @@ class XHTML_Option extends XHtmlElement class XHTML_Select extends XHTMLElement { var $_data; - function XHTML_Select ($name, $multiple = false, $size = null) { - XHtmlElement::XHtmlElement(); + function __construct($name, $multiple = false, $size = null) { + parent::__construct(); $this->set_attribute("name", $name); if ($multiple) $this->set_attribute("multiple","multiple"); @@ -206,7 +206,10 @@ class XHTML_Select extends XHTMLElement function fetch() { if (isset($this->_data) && $this->_data) { - foreach ($this->_data as $value) { $this->add(new XHTML_Option($value)); } + foreach ($this->_data as $value) { + $XHTML_Opt = new XHTML_Option($value); + $this->add($XHTML_Opt); + } } return parent::fetch(); } diff -urNpa phpPgAdmin-5.2-dev/classes/database/ADODB_base.php phpPgAdmin/classes/database/ADODB_base.php --- phpPgAdmin-5.2-dev/classes/database/ADODB_base.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/ADODB_base.php 2018-04-14 21:44:12.554269067 +0000 @@ -20,7 +20,7 @@ class ADODB_base { * Base constructor * @param &$conn The connection object */ - function ADODB_base(&$conn) { + function __construct(&$conn) { $this->conn = $conn; } @@ -59,7 +59,7 @@ class ADODB_base { */ function arrayClean(&$arr) { reset($arr); - while(list($k, $v) = each($arr)) + foreach ($arr as $k => $v) $arr[$k] = addslashes($v); return $arr; } @@ -141,7 +141,7 @@ class ADODB_base { // Build clause $sql = ''; - while(list($key, $value) = each($conditions)) { + foreach ($conditions as $key => $value) { $this->clean($key); $this->clean($value); if ($sql) $sql .= " AND \"{$key}\"='{$value}'"; @@ -221,7 +221,7 @@ class ADODB_base { // Populate the syntax arrays reset($vars); - while(list($key, $value) = each($vars)) { + foreach ($vars as $key => $value) { $this->fieldClean($key); $this->clean($value); if ($setClause) $setClause .= ", \"{$key}\"='{$value}'"; @@ -229,14 +229,13 @@ class ADODB_base { } reset($nulls); - while(list(, $value) = each($nulls)) { + foreach ($nulls as $value) { $this->fieldClean($value); if ($setClause) $setClause .= ", \"{$value}\"=NULL"; else $setClause = "UPDATE \"{$table}\" SET \"{$value}\"=NULL"; } - reset($where); - while(list($key, $value) = each($where)) { + foreach ($where as $key => $value) { $this->fieldClean($key); $this->clean($value); if ($whereClause) $whereClause .= " AND \"{$key}\"='{$value}'"; diff -urNpa phpPgAdmin-5.2-dev/classes/database/Connection.php phpPgAdmin/classes/database/Connection.php --- phpPgAdmin-5.2-dev/classes/database/Connection.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Connection.php 2018-04-14 21:49:02.514265802 +0000 @@ -19,8 +19,8 @@ class Connection { * Creates a new connection. Will actually make a database connection. * @param $fetchMode Defaults to associative. Override for different behaviour */ - function Connection($host, $port, $sslmode, $user, $password, $database, $fetchMode = ADODB_FETCH_ASSOC) { - $this->conn = ADONewConnection('postgres7'); + function __construct($host, $port, $sslmode, $user, $password, $database, $fetchMode = ADODB_FETCH_ASSOC) { + $this->conn = ADONewConnection('postgres'); $this->conn->setFetchMode($fetchMode); // Ignore host if null diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres74.php phpPgAdmin/classes/database/Postgres74.php --- phpPgAdmin-5.2-dev/classes/database/Postgres74.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres74.php 2018-04-14 21:37:08.509273841 +0000 @@ -29,8 +29,8 @@ class Postgres74 extends Postgres80 { * Constructor * @param $conn The database connection */ - function Postgres74($conn) { - $this->Postgres80($conn); + function __construct($conn) { + parent::__construct($conn); } // Help functions diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres80.php phpPgAdmin/classes/database/Postgres80.php --- phpPgAdmin-5.2-dev/classes/database/Postgres80.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres80.php 2018-04-14 21:37:08.509273841 +0000 @@ -50,8 +50,8 @@ class Postgres80 extends Postgres81 { * Constructor * @param $conn The database connection */ - function Postgres80($conn) { - $this->Postgres81($conn); + function __construct($conn) { + parent::__construct($conn); } // Help functions diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres81.php phpPgAdmin/classes/database/Postgres81.php --- phpPgAdmin-5.2-dev/classes/database/Postgres81.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres81.php 2018-04-14 21:37:08.509273841 +0000 @@ -45,8 +45,8 @@ class Postgres81 extends Postgres82 { * Constructor * @param $conn The database connection */ - function Postgres81($conn) { - $this->Postgres82($conn); + function __construct($conn) { + parent::__construct($conn); } // Help functions diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres82.php phpPgAdmin/classes/database/Postgres82.php --- phpPgAdmin-5.2-dev/classes/database/Postgres82.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres82.php 2018-04-14 21:37:08.509273841 +0000 @@ -22,8 +22,8 @@ class Postgres82 extends Postgres83 { * Constructor * @param $conn The database connection */ - function Postgres82($conn) { - $this->Postgres($conn); + function __construct($conn) { + parent::__construct($conn); } // Help functions diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres83.php phpPgAdmin/classes/database/Postgres83.php --- phpPgAdmin-5.2-dev/classes/database/Postgres83.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres83.php 2018-04-14 21:37:08.509273841 +0000 @@ -45,8 +45,8 @@ class Postgres83 extends Postgres84 { * Constructor * @param $conn The database connection */ - function Postgres83($conn) { - $this->Postgres($conn); + function __construct($conn) { + parent::__construct($conn); } // Help functions diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres84.php phpPgAdmin/classes/database/Postgres84.php --- phpPgAdmin-5.2-dev/classes/database/Postgres84.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres84.php 2018-04-14 21:37:08.509273841 +0000 @@ -30,8 +30,8 @@ class Postgres84 extends Postgres90 { * Constructor * @param $conn The database connection */ - function Postgres84($conn) { - $this->Postgres($conn); + function __construct($conn) { + parent::__construct($conn); } // Help functions diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres90.php phpPgAdmin/classes/database/Postgres90.php --- phpPgAdmin-5.2-dev/classes/database/Postgres90.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres90.php 2018-04-14 21:37:08.509273841 +0000 @@ -16,8 +16,8 @@ class Postgres90 extends Postgres91 { * Constructor * @param $conn The database connection */ - function Postgres90($conn) { - $this->Postgres($conn); + function __construct($conn) { + parent::__construct($conn); } // Help functions diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres91.php phpPgAdmin/classes/database/Postgres91.php --- phpPgAdmin-5.2-dev/classes/database/Postgres91.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres91.php 2018-04-14 21:37:08.509273841 +0000 @@ -16,8 +16,8 @@ class Postgres91 extends Postgres92 { * Constructor * @param $conn The database connection */ - function Postgres91($conn) { - $this->Postgres($conn); + function __construct($conn) { + parent::__construct($conn); } // Help functions diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres92.php phpPgAdmin/classes/database/Postgres92.php --- phpPgAdmin-5.2-dev/classes/database/Postgres92.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres92.php 2018-04-14 21:37:08.509273841 +0000 @@ -15,8 +15,8 @@ class Postgres92 extends Postgres93 { * Constructor * @param $conn The database connection */ - function Postgres92($conn) { - $this->Postgres($conn); + function __construct($conn) { + parent::__construct($conn); } // Help functions diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres93.php phpPgAdmin/classes/database/Postgres93.php --- phpPgAdmin-5.2-dev/classes/database/Postgres93.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres93.php 2018-04-14 21:37:08.509273841 +0000 @@ -15,8 +15,8 @@ class Postgres93 extends Postgres94 { * Constructor * @param $conn The database connection */ - function Postgres93($conn) { - $this->Postgres($conn); + function __construct($conn) { + parent::__construct($conn); } // Help functions diff -urNpa phpPgAdmin-5.2-dev/classes/database/Postgres.php phpPgAdmin/classes/database/Postgres.php --- phpPgAdmin-5.2-dev/classes/database/Postgres.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/database/Postgres.php 2018-04-14 21:37:08.508273841 +0000 @@ -169,8 +169,8 @@ class Postgres extends ADODB_base { * Constructor * @param $conn The database connection */ - function Postgres($conn) { - $this->ADODB_base($conn); + function __construct($conn) { + parent::__construct($conn); } // Formatting functions diff -urNpa phpPgAdmin-5.2-dev/classes/Gui.php phpPgAdmin/classes/Gui.php --- phpPgAdmin-5.2-dev/classes/Gui.php 2018-04-14 21:23:50.000000000 +0000 +++ phpPgAdmin/classes/Gui.php 2018-04-14 21:37:08.506273841 +0000 @@ -9,7 +9,7 @@ /** *Constructor */ - function GUI () {} + function __construct () {} /** * Prints a combox box @@ -21,7 +21,7 @@ * @param (optional) $iSize int to specify the size IF a multi select combo * @return string with the generated HTML select box */ - function printCombo(&$arrOptions, $szName, $bBlankEntry = true, $szDefault = '', $bMultiple = false, $iSize = 10) { + static function printCombo(&$arrOptions, $szName, $bBlankEntry = true, $szDefault = '', $bMultiple = false, $iSize = 10) { $htmlOut = ''; if ($bMultiple) // If multiple select combo $htmlOut .= "