Nextcloud 12 compat

master
Loic Blot 2017-05-23 08:44:54 +02:00
parent d730909733
commit 8f41dd3fd0
4 changed files with 7 additions and 7 deletions

View File

@ -40,11 +40,11 @@ class Application extends App {
* Database Layer
*/
$container->registerService('CityMapper', function(IContainer $c) {
return new CityMapper($c->query('ServerContainer')->getDb());
return new CityMapper($c->query('ServerContainer')->getDatabaseConnection());
});
$container->registerService('SettingsMapper', function(IContainer $c) {
return new SettingsMapper($c->query('ServerContainer')->getDb());
return new SettingsMapper($c->query('ServerContainer')->getDatabaseConnection());
});
/**

View File

@ -4,7 +4,7 @@
<id>weather</id>
<name>Weather</name>
<description>Watch the weather directly on your Nextcloud.</description>
<version>1.4.1</version>
<version>1.4.2</version>
<licence>AGPL</licence>
<author>Loic Blot</author>
<category>tools</category>

View File

@ -11,12 +11,12 @@
namespace OCA\Weather\Db;
use \OCP\IDb;
use \OCP\IDBConnection;
use \OCP\AppFramework\Db\Mapper;
class CityMapper extends Mapper {
public function __construct (IDb $db) {
public function __construct (IDBConnection $db) {
parent::__construct($db, 'weather_city');
}

View File

@ -11,12 +11,12 @@
namespace OCA\Weather\Db;
use \OCP\IDb;
use \OCP\IDBConnection;
use \OCP\AppFramework\Db\Mapper;
class SettingsMapper extends Mapper {
public function __construct (IDb $db) {
public function __construct (IDBConnection $db) {
parent::__construct($db, 'weather_city');
}