Skip to content

Commit

Permalink
Fix migration issues
Browse files Browse the repository at this point in the history
  • Loading branch information
marius-wieschollek committed Jun 6, 2018
1 parent 31658f1 commit 48183b1
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Sie können auch einzelne Passwörter mit anderen Nutzern teilen.
* ... und vieles mehr
]]>
</description>
<version>2018.6.2-BUILD</version>
<version>2018.6.3-BUILD</version>
<licence>agpl</licence>
<author mail="[email protected]" homepage="https://git.mdns.eu/nextcloud/passwords">Marius David Wieschollek</author>
<namespace>Passwords</namespace>
Expand Down
16 changes: 8 additions & 8 deletions src/lib/Controller/Api/AbstractObjectApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use OCA\Passwords\Db\AbstractRevisionEntity;
use OCA\Passwords\Exception\ApiException;
use OCA\Passwords\Helper\ApiObjects\AbstractObjectHelper;
use OCA\Passwords\Services\Object\UpdatedAbstractModelService;
use OCA\Passwords\Services\Object\AbstractModelService;
use OCA\Passwords\Services\Object\AbstractRevisionService;
use OCA\Passwords\Services\ValidationService;
use OCP\AppFramework\Http\JSONResponse;
Expand All @@ -25,7 +25,7 @@
abstract class AbstractObjectApiController extends AbstractApiController {

/**
* @var UpdatedAbstractModelService
* @var AbstractModelService
*/
protected $modelService;

Expand All @@ -52,15 +52,15 @@ abstract class AbstractObjectApiController extends AbstractApiController {
/**
* AbstractObjectApiController constructor.
*
* @param IRequest $request
* @param UpdatedAbstractModelService $modelService
* @param AbstractObjectHelper $objectHelper
* @param ValidationService $validationService
* @param AbstractRevisionService $revisionService
* @param IRequest $request
* @param AbstractModelService $modelService
* @param AbstractObjectHelper $objectHelper
* @param ValidationService $validationService
* @param AbstractRevisionService $revisionService
*/
public function __construct(
IRequest $request,
UpdatedAbstractModelService $modelService,
AbstractModelService $modelService,
AbstractObjectHelper $objectHelper,
ValidationService $validationService,
AbstractRevisionService $revisionService
Expand Down
6 changes: 3 additions & 3 deletions src/lib/Helper/User/DeleteUserDataHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use OCA\Passwords\Db\EntityInterface;
use OCA\Passwords\Helper\Settings\UserSettingsHelper;
use OCA\Passwords\Services\ConfigurationService;
use OCA\Passwords\Services\Object\UpdatedAbstractModelService;
use OCA\Passwords\Services\Object\AbstractModelService;
use OCA\Passwords\Services\Object\AbstractService;
use OCA\Passwords\Services\Object\FolderService;
use OCA\Passwords\Services\Object\PasswordService;
Expand Down Expand Up @@ -116,8 +116,8 @@ public function deleteUserData(string $userId): void {
}

/**
* @param UpdatedAbstractModelService|ShareService|AbstractService $service
* @param string $userId
* @param AbstractModelService|ShareService|AbstractService $service
* @param string $userId
*
* @throws \Exception
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
use OCP\AppFramework\Db\Entity;

/**
* Class UpdatedAbstractModelService
* Class AbstractModelService
*
* @package OCA\AbstractParentEntitys\Services\Object
* @TODO The Updated* is supposed to fix an ugly issue in the Nextcloud updater. Rename to AbstractModelService in 2019.1.0
*/
abstract class UpdatedAbstractModelService extends AbstractService {
abstract class AbstractModelService extends AbstractService {

/**
* UpdatedAbstractModelService constructor.
* AbstractModelService constructor.
*
* @param HookManager $hookManager
* @param AbstractMapper $mapper
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Services/Object/FolderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @package OCA\Passwords\Services
*/
class FolderService extends UpdatedAbstractModelService {
class FolderService extends AbstractModelService {

const BASE_FOLDER_UUID = '00000000-0000-0000-0000-000000000000';

Expand Down
2 changes: 1 addition & 1 deletion src/lib/Services/Object/PasswordService.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @package OCA\Passwords\Services
*/
class PasswordService extends UpdatedAbstractModelService {
class PasswordService extends AbstractModelService {

/**
* @var PasswordMapper
Expand Down
11 changes: 9 additions & 2 deletions src/lib/Services/Object/TagService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* @package OCA\Passwords\Services\Object
*/
class TagService extends UpdatedAbstractModelService {
class TagService extends AbstractModelService {

/**
* @var TagMapper
Expand All @@ -29,6 +29,7 @@ class TagService extends UpdatedAbstractModelService {
*/
protected $class = Tag::class;

/** @noinspection PhpMissingParentConstructorInspection */
/**
* TagService constructor.
*
Expand All @@ -37,7 +38,13 @@ class TagService extends UpdatedAbstractModelService {
* @param EnvironmentService $environment
*/
public function __construct(HookManager $hookManager, TagMapper $mapper, EnvironmentService $environment) {
parent::__construct($hookManager, $mapper, $environment);
/**
* This fixes the update issue 2018.5.2 => 2018.6.0
* @TODO remove in 2019.1.0
*/
$this->userId = $environment->getUserId();
$this->hookManager = $hookManager;
$this->mapper = $mapper;
}

/**
Expand Down

0 comments on commit 48183b1

Please sign in to comment.