summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup/MySQL.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-07-12 13:11:44 +0200
committerRobin Appelman <icewind@owncloud.com>2016-07-12 14:38:24 +0200
commit8a79d314cf544cf2ca261cbac7ea07570e9ed8e5 (patch)
tree5242aa67b16c0e7ea0e2e1bf198f8434b0a8f358 /lib/private/Setup/MySQL.php
parent2bf7d3a5bd31ecdabeade82b0ac45b061d41d186 (diff)
downloadnextcloud-server-8a79d314cf544cf2ca261cbac7ea07570e9ed8e5.tar.gz
nextcloud-server-8a79d314cf544cf2ca261cbac7ea07570e9ed8e5.zip
Remove duplicate database connect logic in mysql setup
Diffstat (limited to 'lib/private/Setup/MySQL.php')
-rw-r--r--lib/private/Setup/MySQL.php35
1 files changed, 0 insertions, 35 deletions
diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php
index 1ff7b278b86..03a1421f428 100644
--- a/lib/private/Setup/MySQL.php
+++ b/lib/private/Setup/MySQL.php
@@ -88,41 +88,6 @@ class MySQL extends AbstractDatabase {
}
/**
- * @return \OC\DB\Connection
- * @throws \OC\DatabaseSetupException
- */
- private function connect() {
-
- $connectionParams = array(
- 'host' => $this->dbHost,
- 'user' => $this->dbUser,
- 'password' => $this->dbPassword,
- 'tablePrefix' => $this->tablePrefix,
- );
-
- // adding port support through installer
- if(!empty($this->dbPort)) {
- if (ctype_digit($this->dbPort)) {
- $connectionParams['port'] = $this->dbPort;
- } else {
- $connectionParams['unix_socket'] = $this->dbPort;
- }
- } else if (strpos($this->dbHost, ':')) {
- // Host variable may carry a port or socket.
- list($host, $portOrSocket) = explode(':', $this->dbHost, 2);
- if (ctype_digit($portOrSocket)) {
- $connectionParams['port'] = $portOrSocket;
- } else {
- $connectionParams['unix_socket'] = $portOrSocket;
- }
- $connectionParams['host'] = $host;
- }
-
- $cf = new ConnectionFactory();
- return $cf->getConnection('mysql', $connectionParams);
- }
-
- /**
* @param $username
* @param IDBConnection $connection
* @return array