Fix to work with nextcloud version 11.

This commit is contained in:
Marcin Łojewski
2017-02-04 09:22:32 +01:00
parent 956df86e0a
commit 02b53fad1a
3 changed files with 3 additions and 3 deletions

View File

@@ -21,7 +21,7 @@
* *
*/ */
require_once('apps/user_sql/user_sql.php'); require_once __DIR__ . '/../user_sql.php';
\OCP\App::registerAdmin('user_sql','settings'); \OCP\App::registerAdmin('user_sql','settings');
$backend = new \OCA\user_sql\OC_USER_SQL; $backend = new \OCA\user_sql\OC_USER_SQL;

View File

@@ -15,6 +15,6 @@
<category>auth</category> <category>auth</category>
<dependencies> <dependencies>
<owncloud min-version="8.1" max-version="9.1"/> <owncloud min-version="8.1" max-version="9.1"/>
<nextcloud min-version="9" max-version="10"/> <nextcloud min-version="9" max-version="11"/>
</dependencies> </dependencies>
</info> </info>

View File

@@ -225,7 +225,7 @@ class Helper {
public function connectToDb($settings) public function connectToDb($settings)
{ {
$this -> settings = $settings; $this -> settings = $settings;
$cm = new \OC\DB\ConnectionFactory(); $cm = new \OC\DB\ConnectionFactory(\OC::$server->getConfig());
$parameters = array('host' => $this -> settings['sql_hostname'], $parameters = array('host' => $this -> settings['sql_hostname'],
'password' => $this -> settings['sql_password'], 'password' => $this -> settings['sql_password'],
'user' => $this -> settings['sql_username'], 'user' => $this -> settings['sql_username'],