Skip to content

Commit f5b0ca2

Browse files
author
nveid
committed
Converted all mysql_ calls to OO based mysqli calls.
Also removed the calls to the db closeConn calls in favor of destryong the connections on the class __destruct() 's.. Since firebird db had a closeConn as well, changed its __destruct to calls its own personal closeConn which otherwise left unmodified. Refs: 1722
1 parent 60c54cf commit f5b0ca2

File tree

5 files changed

+1130
-1143
lines changed

5 files changed

+1130
-1143
lines changed

interface/lib/app.inc.php

100644100755
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public function __construct() {
7878

7979
public function __destruct() {
8080
session_write_close();
81-
if(isset($this->db)) $this->db->closeConn();
8281
}
8382

8483
public function uses($classes) {
@@ -243,4 +242,4 @@ public function tpl_defaults() {
243242
//* possible future = new app($conf);
244243
$app = new app();
245244

246-
?>
245+
?>

interface/lib/classes/db_firebird.inc.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class db {
4545
var $transID;
4646

4747
// constructor
48-
function db()
48+
function __construct()
4949
{
5050

5151
global $conf;
@@ -55,6 +55,9 @@ function db()
5555
$this->dbPass = $conf["db_password"];
5656
$this->connect();
5757
}
58+
function __destruct() {
59+
$this->closeConn();
60+
}
5861

5962
// error handler
6063
function updateError($location)
@@ -377,4 +380,4 @@ function mapType($metaType,$typeValue) {
377380

378381
}
379382

380-
?>
383+
?>

0 commit comments

Comments
 (0)