diff options
author | René Gieling <github@dartcafe.de> | 2018-02-04 14:45:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-04 14:45:37 +0300 |
commit | 7465dca16fe42661bd2c4d22116cd796756f5be0 (patch) | |
tree | 0c32820a2fadabd16c1d1a81e7a7af6c0dc2940c /lib/AppInfo | |
parent | 41eecc4d3dde9fc68b466f99f0ba4c89efffa280 (diff) |
[WIP] Migrate particip tables (#293)
* Migration of
- text and date into options
- Participation and ParticipationText into Votes
* Fix delete poll from details view
* You voted, you commented
Diffstat (limited to 'lib/AppInfo')
-rw-r--r-- | lib/AppInfo/Application.php | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index b6277fb3..346ba0b1 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -25,12 +25,10 @@ namespace OCA\Polls\AppInfo; use OCA\Polls\Controller\PageController; use OCA\Polls\Db\CommentMapper; -use OCA\Polls\Db\DateMapper; +use OCA\Polls\Db\OptionsMapper; use OCA\Polls\Db\EventMapper; use OCA\Polls\Db\NotificationMapper; -use OCA\Polls\Db\ParticipationMapper; -use OCA\Polls\Db\ParticipationTextMapper; -use OCA\Polls\Db\TextMapper; +use OCA\Polls\Db\VotesMapper; use OCP\AppFramework\App; use OCP\IContainer; @@ -61,12 +59,10 @@ class Application extends App { $c->query('ServerContainer')->getURLGenerator(), $c->query('UserId'), $c->query('CommentMapper'), - $c->query('DateMapper'), + $c->query('OptionsMapper'), $c->query('EventMapper'), $c->query('NotificationMapper'), - $c->query('ParticipationMapper'), - $c->query('ParticipationTextMapper'), - $c->query('TextMapper') + $c->query('VotesMapper') ); }); @@ -96,8 +92,8 @@ class Application extends App { ); }); - $container->registerService('DateMapper', function (IContainer $c) use ($server) { - return new DateMapper( + $container->registerService('OptionsMapper', function (IContainer $c) use ($server) { + return new OptionsMapper( $server->getDatabaseConnection() ); }); @@ -114,25 +110,13 @@ class Application extends App { ); }); - $container->registerService('ParticipationMapper', function (IContainer $c) use ($server) { - return new ParticipationMapper( + $container->registerService('VotesMapper', function (IContainer $c) use ($server) { + return new VotesMapper( $server->getDatabaseConnection() ); }); - $container->registerService('ParticipationTextMapper', function (IContainer $c) use ($server) { - return new ParticipationTextMapper( - $server->getDatabaseConnection() - ); - }); - - $container->registerService('TextMapper', function (IContainer $c) use ($server) { - return new TextMapper( - $server->getDatabaseConnection() - ); - }); } - /** * Register navigation entry for main navigation. */ |