summaryrefslogtreecommitdiff
path: root/classes/database
diff options
context:
space:
mode:
authorRobert Treat2019-06-28 03:53:19 +0000
committerRobert Treat2019-06-28 03:53:19 +0000
commit1ea83accae6229e6b63844d948ed144fe486fee0 (patch)
treea74666522a74f673a3a97634b49df663f2952562 /classes/database
parent1fca558b9fd30bb7398b103419a56bf9efce2794 (diff)
At last, the long awaited patch for php7 support.
This commit is focused strictly on the class/constructor changes. This has primarily been tested on php 7.1 and postgres 11, with all tests passing though there are some spurious warnings; I have fixes for them but will add them in seperate commits. Note that the code here is my own, but I did look at patches from @gabrielhomsi and @w1ldzer0 for some sanity checking. Any bugs or missing items are on me.
Diffstat (limited to 'classes/database')
-rw-r--r--classes/database/ADODB_base.php2
-rwxr-xr-xclasses/database/Connection.php2
-rwxr-xr-xclasses/database/Postgres.php4
-rw-r--r--classes/database/Postgres10.php4
-rw-r--r--classes/database/Postgres11.php4
-rw-r--r--classes/database/Postgres74.php4
-rw-r--r--classes/database/Postgres80.php4
-rw-r--r--classes/database/Postgres81.php4
-rw-r--r--classes/database/Postgres82.php4
-rw-r--r--classes/database/Postgres83.php4
-rwxr-xr-xclasses/database/Postgres84.php4
-rwxr-xr-xclasses/database/Postgres90.php4
-rwxr-xr-xclasses/database/Postgres91.php4
-rw-r--r--classes/database/Postgres92.php4
-rw-r--r--classes/database/Postgres93.php4
-rw-r--r--classes/database/Postgres94.php4
-rw-r--r--classes/database/Postgres95.php6
-rw-r--r--classes/database/Postgres96.php6
18 files changed, 36 insertions, 36 deletions
diff --git a/classes/database/ADODB_base.php b/classes/database/ADODB_base.php
index 816d6930..9e597f0f 100644
--- a/classes/database/ADODB_base.php
+++ b/classes/database/ADODB_base.php
@@ -20,7 +20,7 @@ class ADODB_base {
* Base constructor
* @param &$conn The connection object
*/
- function ADODB_base(&$conn) {
+ function __construct(&$conn) {
$this->conn = $conn;
}
diff --git a/classes/database/Connection.php b/classes/database/Connection.php
index eb22cd21..4e0695b0 100755
--- a/classes/database/Connection.php
+++ b/classes/database/Connection.php
@@ -19,7 +19,7 @@ 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) {
+ function __construct($host, $port, $sslmode, $user, $password, $database, $fetchMode = ADODB_FETCH_ASSOC) {
$this->conn = ADONewConnection('postgres7');
$this->conn->setFetchMode($fetchMode);
diff --git a/classes/database/Postgres.php b/classes/database/Postgres.php
index ee19990f..1eb490a0 100755
--- a/classes/database/Postgres.php
+++ b/classes/database/Postgres.php
@@ -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 --git a/classes/database/Postgres10.php b/classes/database/Postgres10.php
index 5f851d80..17a08124 100644
--- a/classes/database/Postgres10.php
+++ b/classes/database/Postgres10.php
@@ -15,8 +15,8 @@ class Postgres10 extends Postgres11 {
* Constructor
* @param $conn The database connection
*/
- function Postgres10($conn) {
- $this->Postgres($conn);
+ function __construct($conn) {
+ parent::__construct($conn);
}
// Help functions
diff --git a/classes/database/Postgres11.php b/classes/database/Postgres11.php
index 2a3ae84b..38aa20fb 100644
--- a/classes/database/Postgres11.php
+++ b/classes/database/Postgres11.php
@@ -15,8 +15,8 @@ class Postgres11 extends Postgres {
* Constructor
* @param $conn The database connection
*/
- function Postgres11($conn) {
- $this->Postgres($conn);
+ function __construct($conn) {
+ parent::__construct($conn);
}
// Help functions
diff --git a/classes/database/Postgres74.php b/classes/database/Postgres74.php
index 4310eb64..a68c4fd9 100644
--- a/classes/database/Postgres74.php
+++ b/classes/database/Postgres74.php
@@ -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 --git a/classes/database/Postgres80.php b/classes/database/Postgres80.php
index 1f29c1cf..db6cf098 100644
--- a/classes/database/Postgres80.php
+++ b/classes/database/Postgres80.php
@@ -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 --git a/classes/database/Postgres81.php b/classes/database/Postgres81.php
index 70d40b82..cfe47ee2 100644
--- a/classes/database/Postgres81.php
+++ b/classes/database/Postgres81.php
@@ -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 --git a/classes/database/Postgres82.php b/classes/database/Postgres82.php
index e30cd673..4b3cfd11 100644
--- a/classes/database/Postgres82.php
+++ b/classes/database/Postgres82.php
@@ -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 --git a/classes/database/Postgres83.php b/classes/database/Postgres83.php
index ce0416b9..fc14e76e 100644
--- a/classes/database/Postgres83.php
+++ b/classes/database/Postgres83.php
@@ -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 --git a/classes/database/Postgres84.php b/classes/database/Postgres84.php
index bc2b2b34..59d9f2f7 100755
--- a/classes/database/Postgres84.php
+++ b/classes/database/Postgres84.php
@@ -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 --git a/classes/database/Postgres90.php b/classes/database/Postgres90.php
index 9f7b3a09..f4a9c646 100755
--- a/classes/database/Postgres90.php
+++ b/classes/database/Postgres90.php
@@ -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 --git a/classes/database/Postgres91.php b/classes/database/Postgres91.php
index fb6d952c..91136334 100755
--- a/classes/database/Postgres91.php
+++ b/classes/database/Postgres91.php
@@ -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 --git a/classes/database/Postgres92.php b/classes/database/Postgres92.php
index d20b188a..24621636 100644
--- a/classes/database/Postgres92.php
+++ b/classes/database/Postgres92.php
@@ -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 --git a/classes/database/Postgres93.php b/classes/database/Postgres93.php
index 24ee22d6..308eca65 100644
--- a/classes/database/Postgres93.php
+++ b/classes/database/Postgres93.php
@@ -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 --git a/classes/database/Postgres94.php b/classes/database/Postgres94.php
index 619b238b..908825e5 100644
--- a/classes/database/Postgres94.php
+++ b/classes/database/Postgres94.php
@@ -15,8 +15,8 @@ class Postgres94 extends Postgres {
* Constructor
* @param $conn The database connection
*/
- function Postgres94($conn) {
- $this->Postgres($conn);
+ function __construct($conn) {
+ parent::__construct($conn);
}
// Help functions
diff --git a/classes/database/Postgres95.php b/classes/database/Postgres95.php
index 0120e550..fbe7558d 100644
--- a/classes/database/Postgres95.php
+++ b/classes/database/Postgres95.php
@@ -15,9 +15,9 @@ class Postgres95 extends Postgres96 {
* Constructor
* @param $conn The database connection
*/
- function Postgres95($conn) {
- $this->Postgres($conn);
- }
+ function __construct($conn) {
+ parent::__construct($conn);
+ }
// Help functions
diff --git a/classes/database/Postgres96.php b/classes/database/Postgres96.php
index 19397e15..5375a738 100644
--- a/classes/database/Postgres96.php
+++ b/classes/database/Postgres96.php
@@ -15,9 +15,9 @@ class Postgres96 extends Postgres10 {
* Constructor
* @param $conn The database connection
*/
- function Postgres96($conn) {
- $this->Postgres($conn);
- }
+ function __construct($conn) {
+ parent::__construct($conn);
+ }
// Help functions