Skip to content

Commit

Permalink
Merge pull request #2549 from nextcloud/artonge/revert/2544
Browse files Browse the repository at this point in the history
[stable27] Revert: Adapt version backend to new features
  • Loading branch information
icewind1991 authored Sep 12, 2023
2 parents 2c7d869 + 68f6cd5 commit ccb4ed7
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 461 deletions.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Folders can be configured from *Group folders* in the admin settings.
After a folder is created, the admin can give access to the folder to one or more groups, control their write/sharing permissions and assign a quota for the folder.
Note: Encrypting the contents of group folders is currently not supported.]]></description>
<version>15.1.0</version>
<version>15.2.0</version>
<licence>agpl</licence>
<author>Robin Appelman</author>
<namespace>GroupFolders</namespace>
Expand Down
8 changes: 1 addition & 7 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
use OCA\GroupFolders\Trash\TrashBackend;
use OCA\GroupFolders\Trash\TrashManager;
use OCA\GroupFolders\Versions\GroupVersionsExpireManager;
use OCA\GroupFolders\Versions\GroupVersionsMapper;
use OCA\GroupFolders\Versions\VersionsBackend;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
Expand All @@ -58,8 +57,6 @@
use OCP\AppFramework\IAppContainer;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\Config\IMountProviderCollection;
use OCP\Files\IMimeTypeLoader;
use OCP\Files\IRootFolder;
use OCP\ICacheFactory;
use OCP\IDBConnection;
use OCP\IGroup;
Expand Down Expand Up @@ -136,13 +133,10 @@ public function register(IRegistrationContext $context): void {

$context->registerService(VersionsBackend::class, function (IAppContainer $c): VersionsBackend {
return new VersionsBackend(
$c->get(IRootFolder::class),
$c->get('GroupAppFolder'),
$c->get(MountProvider::class),
$c->get(ITimeFactory::class),
$c->get(LoggerInterface::class),
$c->get(GroupVersionsMapper::class),
$c->get(IMimeTypeLoader::class),
$c->get(LoggerInterface::class)
);
});

Expand Down
4 changes: 0 additions & 4 deletions lib/Helper/LazyFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,4 @@ public function changeLock($targetType) {
public function unlock($type) {
return $this->__call(__FUNCTION__, func_get_args());
}

public function getParentId(): int {
return $this->__call(__FUNCTION__, func_get_args());
}
}
86 changes: 0 additions & 86 deletions lib/Migration/Version16000Date20230821085801.php

This file was deleted.

14 changes: 10 additions & 4 deletions lib/Versions/GroupVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
use OCP\IUser;

class GroupVersion extends Version {
/** @var File */
private $versionFile;

/** @var int */
private $folderId;

public function __construct(
int $timestamp,
Expand All @@ -41,11 +46,12 @@ public function __construct(
FileInfo $sourceFileInfo,
IVersionBackend $backend,
IUser $user,
string $label,
private File $versionFile,
private int $folderId,
File $versionFile,
int $folderId
) {
parent::__construct($timestamp, $revisionId, $name, $size, $mimetype, $path, $sourceFileInfo, $backend, $user, $label);
parent::__construct($timestamp, $revisionId, $name, $size, $mimetype, $path, $sourceFileInfo, $backend, $user);
$this->versionFile = $versionFile;
$this->folderId = $folderId;
}

public function getVersionFile(): File {
Expand Down
92 changes: 0 additions & 92 deletions lib/Versions/GroupVersionEntity.php

This file was deleted.

86 changes: 0 additions & 86 deletions lib/Versions/GroupVersionsMapper.php

This file was deleted.

Loading

0 comments on commit ccb4ed7

Please sign in to comment.