aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/composer/composer/autoload_classmap.php4
-rw-r--r--lib/composer/composer/autoload_static.php4
-rw-r--r--lib/l10n/ro.js1
-rw-r--r--lib/l10n/ro.json1
-rw-r--r--lib/private/FilesMetadata/FilesMetadataManager.php4
-rw-r--r--lib/private/FilesMetadata/Listener/MetadataDelete.php11
-rw-r--r--lib/private/Repair.php4
-rw-r--r--lib/private/Repair/AddMetadataGenerationJob.php (renamed from lib/private/Repair/AddMetadataMigrationJob.php)12
8 files changed, 20 insertions, 21 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php
index b4897900aea..b90e2866bc6 100644
--- a/lib/composer/composer/autoload_classmap.php
+++ b/lib/composer/composer/autoload_classmap.php
@@ -1003,8 +1003,8 @@ return array(
'OC\\Core\\BackgroundJobs\\BackgroundCleanupUpdaterBackupsJob' => $baseDir . '/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php',
'OC\\Core\\BackgroundJobs\\CheckForUserCertificates' => $baseDir . '/core/BackgroundJobs/CheckForUserCertificates.php',
'OC\\Core\\BackgroundJobs\\CleanupLoginFlowV2' => $baseDir . '/core/BackgroundJobs/CleanupLoginFlowV2.php',
+ 'OC\\Core\\BackgroundJobs\\GenerateMetadataJob' => $baseDir . '/core/BackgroundJobs/GenerateMetadataJob.php',
'OC\\Core\\BackgroundJobs\\LookupServerSendCheckBackgroundJob' => $baseDir . '/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php',
- 'OC\\Core\\BackgroundJobs\\MigrateMetadataJob' => $baseDir . '/core/BackgroundJobs/MigrateMetadataJob.php',
'OC\\Core\\Command\\App\\Disable' => $baseDir . '/core/Command/App/Disable.php',
'OC\\Core\\Command\\App\\Enable' => $baseDir . '/core/Command/App/Enable.php',
'OC\\Core\\Command\\App\\GetPath' => $baseDir . '/core/Command/App/GetPath.php',
@@ -1605,7 +1605,7 @@ return array(
'OC\\RepairException' => $baseDir . '/lib/private/RepairException.php',
'OC\\Repair\\AddBruteForceCleanupJob' => $baseDir . '/lib/private/Repair/AddBruteForceCleanupJob.php',
'OC\\Repair\\AddCleanupUpdaterBackupsJob' => $baseDir . '/lib/private/Repair/AddCleanupUpdaterBackupsJob.php',
- 'OC\\Repair\\AddMetadataMigrationJob' => $baseDir . '/lib/private/Repair/AddMetadataMigrationJob.php',
+ 'OC\\Repair\\AddMetadataGenerationJob' => $baseDir . '/lib/private/Repair/AddMetadataGenerationJob.php',
'OC\\Repair\\AddRemoveOldTasksBackgroundJob' => $baseDir . '/lib/private/Repair/AddRemoveOldTasksBackgroundJob.php',
'OC\\Repair\\CleanTags' => $baseDir . '/lib/private/Repair/CleanTags.php',
'OC\\Repair\\CleanUpAbandonedApps' => $baseDir . '/lib/private/Repair/CleanUpAbandonedApps.php',
diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php
index 89f92f09177..c1c3bc25869 100644
--- a/lib/composer/composer/autoload_static.php
+++ b/lib/composer/composer/autoload_static.php
@@ -1036,8 +1036,8 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OC\\Core\\BackgroundJobs\\BackgroundCleanupUpdaterBackupsJob' => __DIR__ . '/../../..' . '/core/BackgroundJobs/BackgroundCleanupUpdaterBackupsJob.php',
'OC\\Core\\BackgroundJobs\\CheckForUserCertificates' => __DIR__ . '/../../..' . '/core/BackgroundJobs/CheckForUserCertificates.php',
'OC\\Core\\BackgroundJobs\\CleanupLoginFlowV2' => __DIR__ . '/../../..' . '/core/BackgroundJobs/CleanupLoginFlowV2.php',
+ 'OC\\Core\\BackgroundJobs\\GenerateMetadataJob' => __DIR__ . '/../../..' . '/core/BackgroundJobs/GenerateMetadataJob.php',
'OC\\Core\\BackgroundJobs\\LookupServerSendCheckBackgroundJob' => __DIR__ . '/../../..' . '/core/BackgroundJobs/LookupServerSendCheckBackgroundJob.php',
- 'OC\\Core\\BackgroundJobs\\MigrateMetadataJob' => __DIR__ . '/../../..' . '/core/BackgroundJobs/MigrateMetadataJob.php',
'OC\\Core\\Command\\App\\Disable' => __DIR__ . '/../../..' . '/core/Command/App/Disable.php',
'OC\\Core\\Command\\App\\Enable' => __DIR__ . '/../../..' . '/core/Command/App/Enable.php',
'OC\\Core\\Command\\App\\GetPath' => __DIR__ . '/../../..' . '/core/Command/App/GetPath.php',
@@ -1638,7 +1638,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OC\\RepairException' => __DIR__ . '/../../..' . '/lib/private/RepairException.php',
'OC\\Repair\\AddBruteForceCleanupJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddBruteForceCleanupJob.php',
'OC\\Repair\\AddCleanupUpdaterBackupsJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddCleanupUpdaterBackupsJob.php',
- 'OC\\Repair\\AddMetadataMigrationJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddMetadataMigrationJob.php',
+ 'OC\\Repair\\AddMetadataGenerationJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddMetadataGenerationJob.php',
'OC\\Repair\\AddRemoveOldTasksBackgroundJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddRemoveOldTasksBackgroundJob.php',
'OC\\Repair\\CleanTags' => __DIR__ . '/../../..' . '/lib/private/Repair/CleanTags.php',
'OC\\Repair\\CleanUpAbandonedApps' => __DIR__ . '/../../..' . '/lib/private/Repair/CleanUpAbandonedApps.php',
diff --git a/lib/l10n/ro.js b/lib/l10n/ro.js
index d8f3d965148..50a950320a7 100644
--- a/lib/l10n/ro.js
+++ b/lib/l10n/ro.js
@@ -19,6 +19,7 @@ OC.L10N.register(
"Authentication" : "Autentificare",
"Unknown filetype" : "Tip fișier necunoscut",
"Invalid image" : "Imagine invalidă",
+ "Avatar image is not square" : "Imaginea de avatar nu este pătrată",
"Files" : "Fișiere",
"View profile" : "Vezi profilul",
"Local time: %s" : "Timp local: %s",
diff --git a/lib/l10n/ro.json b/lib/l10n/ro.json
index cdf9e4d4c96..862d25e9651 100644
--- a/lib/l10n/ro.json
+++ b/lib/l10n/ro.json
@@ -17,6 +17,7 @@
"Authentication" : "Autentificare",
"Unknown filetype" : "Tip fișier necunoscut",
"Invalid image" : "Imagine invalidă",
+ "Avatar image is not square" : "Imaginea de avatar nu este pătrată",
"Files" : "Fișiere",
"View profile" : "Vezi profilul",
"Local time: %s" : "Timp local: %s",
diff --git a/lib/private/FilesMetadata/FilesMetadataManager.php b/lib/private/FilesMetadata/FilesMetadataManager.php
index 187eed67768..28498af4ab0 100644
--- a/lib/private/FilesMetadata/FilesMetadataManager.php
+++ b/lib/private/FilesMetadata/FilesMetadataManager.php
@@ -37,7 +37,7 @@ use OCP\DB\Exception;
use OCP\DB\Exception as DBException;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\EventDispatcher\IEventDispatcher;
-use OCP\Files\Events\Node\NodeDeletedEvent;
+use OCP\Files\Cache\CacheEntryRemovedEvent;
use OCP\Files\Events\Node\NodeWrittenEvent;
use OCP\Files\InvalidPathException;
use OCP\Files\Node;
@@ -305,6 +305,6 @@ class FilesMetadataManager implements IFilesMetadataManager {
*/
public static function loadListeners(IEventDispatcher $eventDispatcher): void {
$eventDispatcher->addServiceListener(NodeWrittenEvent::class, MetadataUpdate::class);
- $eventDispatcher->addServiceListener(NodeDeletedEvent::class, MetadataDelete::class);
+ $eventDispatcher->addServiceListener(CacheEntryRemovedEvent::class, MetadataDelete::class);
}
}
diff --git a/lib/private/FilesMetadata/Listener/MetadataDelete.php b/lib/private/FilesMetadata/Listener/MetadataDelete.php
index 25c944475a9..d950c2cea5f 100644
--- a/lib/private/FilesMetadata/Listener/MetadataDelete.php
+++ b/lib/private/FilesMetadata/Listener/MetadataDelete.php
@@ -28,14 +28,14 @@ namespace OC\FilesMetadata\Listener;
use Exception;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
-use OCP\Files\Events\Node\NodeDeletedEvent;
+use OCP\Files\Cache\CacheEntryRemovedEvent;
use OCP\FilesMetadata\IFilesMetadataManager;
use Psr\Log\LoggerInterface;
/**
* Handle file deletion event and remove stored metadata related to the deleted file
*
- * @template-implements IEventListener<NodeDeletedEvent>
+ * @template-implements IEventListener<CacheEntryRemovedEvent>
*/
class MetadataDelete implements IEventListener {
public function __construct(
@@ -44,16 +44,13 @@ class MetadataDelete implements IEventListener {
) {
}
- /**
- * @param Event $event
- */
public function handle(Event $event): void {
- if (!($event instanceof NodeDeletedEvent)) {
+ if (!($event instanceof CacheEntryRemovedEvent)) {
return;
}
try {
- $nodeId = (int)$event->getNode()->getId();
+ $nodeId = $event->getFileId();
if ($nodeId > 0) {
$this->filesMetadataManager->deleteMetadata($nodeId);
}
diff --git a/lib/private/Repair.php b/lib/private/Repair.php
index e70c3f7e39d..a12e00f071c 100644
--- a/lib/private/Repair.php
+++ b/lib/private/Repair.php
@@ -46,7 +46,7 @@ use OC\DB\Connection;
use OC\DB\ConnectionAdapter;
use OC\Repair\AddBruteForceCleanupJob;
use OC\Repair\AddCleanupUpdaterBackupsJob;
-use OC\Repair\AddMetadataMigrationJob;
+use OC\Repair\AddMetadataGenerationJob;
use OC\Repair\CleanTags;
use OC\Repair\ClearFrontendCaches;
use OC\Repair\ClearGeneratedAvatarCache;
@@ -212,7 +212,7 @@ class Repair implements IOutput {
\OCP\Server::get(CleanUpAbandonedApps::class),
\OCP\Server::get(AddMissingSecretJob::class),
\OCP\Server::get(AddRemoveOldTasksBackgroundJob::class),
- \OCP\Server::get(AddMetadataMigrationJob::class),
+ \OCP\Server::get(AddMetadataGenerationJob::class),
];
}
diff --git a/lib/private/Repair/AddMetadataMigrationJob.php b/lib/private/Repair/AddMetadataGenerationJob.php
index f73768721dc..72e5df03bbd 100644
--- a/lib/private/Repair/AddMetadataMigrationJob.php
+++ b/lib/private/Repair/AddMetadataGenerationJob.php
@@ -1,8 +1,8 @@
<?php
/**
- * @copyright Copyright (c) 2018 Morris Jobke <hey@morrisjobke.de>
+ * @copyright Copyright (c) 2023 Louis Chmn <louis@chmn.me>
*
- * @author Morris Jobke <hey@morrisjobke.de>
+ * @author Louis Chmn <louis@chmn.me>
*
* @license GNU AGPL version 3 or any later version
*
@@ -22,22 +22,22 @@
*/
namespace OC\Repair;
-use OC\Core\BackgroundJobs\MigrateMetadataJob;
+use OC\Core\BackgroundJobs\GenerateMetadataJob;
use OCP\BackgroundJob\IJobList;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
-class AddMetadataMigrationJob implements IRepairStep {
+class AddMetadataGenerationJob implements IRepairStep {
public function __construct(
private IJobList $jobList,
) {
}
public function getName() {
- return 'Queue a job to migrate legacy metadata tables';
+ return 'Queue a job to generate metadata';
}
public function run(IOutput $output) {
- $this->jobList->add(MigrateMetadataJob::class);
+ $this->jobList->add(GenerateMetadataJob::class);
}
}