Commit 59bbf272 authored by Bernhard Posselt's avatar Bernhard Posselt Committed by Thomas Müller
Browse files

remove IDb interface from core class usage

parent c62eb9d6
......@@ -77,7 +77,7 @@ class Server extends SimpleContainer implements IServerContainer {
return new PreviewManager();
});
$this->registerService('TagMapper', function(Server $c) {
return new TagMapper($c->getDb());
return new TagMapper($c->getDatabaseConnection());
});
$this->registerService('TagManager', function (Server $c) {
$tagMapper = $c->query('TagMapper');
......
......@@ -22,7 +22,7 @@ namespace OC\Tagging;
use \OCP\AppFramework\Db\Mapper,
\OCP\AppFramework\Db\DoesNotExistException,
\OCP\IDb;
\OCP\IDBConnection;
/**
* Mapper for Tag entity
......@@ -32,9 +32,9 @@ class TagMapper extends Mapper {
/**
* Constructor.
*
* @param IDb $db Instance of the Db abstraction layer.
* @param IDBConnection $db Instance of the Db abstraction layer.
*/
public function __construct(IDb $db) {
public function __construct(IDBConnection $db) {
parent::__construct($db, 'vcategory', 'OC\Tagging\Tag');
}
......
......@@ -49,7 +49,7 @@ class Test_Tags extends \Test\TestCase {
->will($this->returnValue($this->user));
$this->objectType = $this->getUniqueID('type_');
$this->tagMapper = new OC\Tagging\TagMapper(\OC::$server->getDb());
$this->tagMapper = new OC\Tagging\TagMapper(\OC::$server->getDatabaseConnection());
$this->tagMgr = new OC\TagManager($this->tagMapper, $this->userSession);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment