From: Jure Kajzer Date: Thu, 28 Apr 2011 12:44:19 +0000 (+0000) Subject: * close connection in class destructor (unlike MySql, Oracle does not commit on close) X-Git-Tag: 1.31.0-rc.0~30525 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=955385cee7a979c5be871b8cc5d4c424900b2b98;p=lhc%2Fweb%2Fwiklou.git * close connection in class destructor (unlike MySql, Oracle does not commit on close) --- diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 3e84badabb..32ffcc9098 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -185,6 +185,14 @@ class DatabaseOracle extends DatabaseBase { wfRunHooks( 'DatabaseOraclePostInit', array( $this ) ); } + function __destruct() { + if ($this->mOpened) { + wfSuppressWarnings(); + $this->close(); + wfRestoreWarnings(); + } + } + function getType() { return 'oracle'; }