dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3c198b9
)
Fix bogus DatabaseOracle::__construct() calls in OracleInstaller
author
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 28 Feb 2018 19:25:15 +0000
(11:25 -0800)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 28 Feb 2018 22:59:30 +0000
(22:59 +0000)
Change-Id: I12a35ac0eeb68e5da9ba07ba44d3522213e9de8e
includes/installer/OracleInstaller.php
patch
|
blob
|
history
diff --git
a/includes/installer/OracleInstaller.php
b/includes/installer/OracleInstaller.php
index
e5418e4
..
659a1d7
100644
(file)
--- a/
includes/installer/OracleInstaller.php
+++ b/
includes/installer/OracleInstaller.php
@@
-165,35
+165,30
@@
class OracleInstaller extends DatabaseInstaller {
}
public function openConnection() {
}
public function openConnection() {
- $status = Status::newGood();
- try {
- $db = new DatabaseOracle(
- $this->getVar( 'wgDBserver' ),
- $this->getVar( '_InstallUser' ),
- $this->getVar( '_InstallPassword' ),
- $this->getVar( '_InstallDBname' ),
- 0,
- $this->getVar( 'wgDBprefix' )
- );
- $status->value = $db;
- } catch ( DBConnectionError $e ) {
- $this->connError = $e->db->lastErrno();
- $status->fatal( 'config-connection-error', $e->getMessage() );
- }
-
- return $status;
+ return $this->doOpenConnection();
}
public function openSYSDBAConnection() {
}
public function openSYSDBAConnection() {
+ return $this->doOpenConnection( DatabaseOracle::DBO_SYSDBA );
+ }
+
+ /**
+ * @param int $flags
+ * @return Status Status with DatabaseOracle or null as the value
+ */
+ private function doOpenConnection( $flags = 0 ) {
$status = Status::newGood();
try {
$status = Status::newGood();
try {
- $db = new DatabaseOracle(
- $this->getVar( 'wgDBserver' ),
- $this->getVar( '_InstallUser' ),
- $this->getVar( '_InstallPassword' ),
- $this->getVar( '_InstallDBname' ),
- DBO_SYSDBA,
- $this->getVar( 'wgDBprefix' )
+ $db = Database::factory(
+ 'oracle',
+ [
+ 'host' => $this->getVar( 'wgDBserver' ),
+ 'user' => $this->getVar( '_InstallUser' ),
+ 'password' => $this->getVar( '_InstallPassword' ),
+ 'dbname' => $this->getVar( '_InstallDBname' ),
+ 'tablePrefix' => $this->getVar( 'wgDBprefix' ),
+ 'flags' => $flags
+ ]
);
$status->value = $db;
} catch ( DBConnectionError $e ) {
);
$status->value = $db;
} catch ( DBConnectionError $e ) {