Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to server API changes #2447

Merged
merged 4 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Command/Scan.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace OCA\GroupFolders\Command;

use OC\Files\ObjectStore\NoopScanner;
use OC\Files\ObjectStore\ObjectStoreScanner;
use OCP\Constants;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument;
Expand Down Expand Up @@ -84,7 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
$scanner = $mount->getStorage()->getScanner();

$output->writeln("Scanning group folder with id\t<info>{$folder['id']}</info>", OutputInterface::VERBOSITY_VERBOSE);
if ($scanner instanceof NoopScanner) {
if ($scanner instanceof ObjectStoreScanner) {
$output->writeln("Scanning group folders using an object store as primary storage is not supported.");
return -1;
}
Expand Down
4 changes: 4 additions & 0 deletions lib/Helper/LazyFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ public function searchByTag($tag, $userId) {
return $this->__call(__FUNCTION__, func_get_args());
}

public function searchBySystemTag(string $tagName, string $userId, int $limit = 0, int $offset = 0) {
return $this->__call(__FUNCTION__, func_get_args());
}

public function getById($id) {
return $this->__call(__FUNCTION__, func_get_args());
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Mount/GroupFolderStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace OCA\GroupFolders\Mount;

use OC\Files\Cache\Scanner;
use OC\Files\ObjectStore\NoopScanner;
use OC\Files\ObjectStore\ObjectStoreScanner;
use OC\Files\ObjectStore\ObjectStoreStorage;
use OC\Files\Storage\Wrapper\Quota;
use OCP\Files\Cache\ICacheEntry;
Expand Down Expand Up @@ -76,7 +76,7 @@ public function getScanner($path = '', $storage = null) {
$storage = $this;
}
if ($storage->instanceOfStorage(ObjectStoreStorage::class)) {
$storage->scanner = new NoopScanner($storage);
$storage->scanner = new ObjectStoreScanner($storage);
} elseif (!isset($storage->scanner)) {
$storage->scanner = new Scanner($storage);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/stub.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ namespace OC\Core\Command {

namespace OC\Files\ObjectStore {
use OC\Files\Cache\Scanner;
class NoopScanner extends Scanner {}
class ObjectStoreScanner extends Scanner {}
}

namespace Symfony\Component\Console\Helper {
Expand Down
Loading