aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2022-11-29 14:58:27 +0100
committerLouis (Rebase PR Action) <artonge@users.noreply.github.com>2023-01-26 10:12:23 +0000
commit8f23cc82596d11ccd71942a6d93dc9d643b0fe1a (patch)
treeedb3f1fca0161ea822273b0a404e325d90d1e45a /apps
parentad469969bf48e0997096878042e3f03228f8f833 (diff)
downloadnextcloud-server-8f23cc82596d11ccd71942a6d93dc9d643b0fe1a.tar.gz
nextcloud-server-8f23cc82596d11ccd71942a6d93dc9d643b0fe1a.zip
Rename Hooks.php to FileEventsListener.php
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_versions/composer/composer/autoload_classmap.php2
-rw-r--r--apps/files_versions/composer/composer/autoload_static.php2
-rw-r--r--apps/files_versions/lib/AppInfo/Application.php18
-rw-r--r--apps/files_versions/lib/Listener/FileEventsListener.php (renamed from apps/files_versions/lib/Hooks.php)5
4 files changed, 14 insertions, 13 deletions
diff --git a/apps/files_versions/composer/composer/autoload_classmap.php b/apps/files_versions/composer/composer/autoload_classmap.php
index 07dc290b604..25a1e1c4913 100644
--- a/apps/files_versions/composer/composer/autoload_classmap.php
+++ b/apps/files_versions/composer/composer/autoload_classmap.php
@@ -18,7 +18,7 @@ return array(
'OCA\\Files_Versions\\Db\\VersionsMapper' => $baseDir . '/../lib/Db/VersionsMapper.php',
'OCA\\Files_Versions\\Events\\CreateVersionEvent' => $baseDir . '/../lib/Events/CreateVersionEvent.php',
'OCA\\Files_Versions\\Expiration' => $baseDir . '/../lib/Expiration.php',
- 'OCA\\Files_Versions\\Hooks' => $baseDir . '/../lib/Hooks.php',
+ 'OCA\\Files_Versions\\Listener\\FileEventsListener' => $baseDir . '/../lib/Listener/FileEventsListener.php',
'OCA\\Files_Versions\\Listener\\LoadAdditionalListener' => $baseDir . '/../lib/Listener/LoadAdditionalListener.php',
'OCA\\Files_Versions\\Listener\\LoadSidebarListener' => $baseDir . '/../lib/Listener/LoadSidebarListener.php',
'OCA\\Files_Versions\\Migration\\Version1020Date20221114144058' => $baseDir . '/../lib/Migration/Version1020Date20221114144058.php',
diff --git a/apps/files_versions/composer/composer/autoload_static.php b/apps/files_versions/composer/composer/autoload_static.php
index 59fa10b4aa0..ee445fe9636 100644
--- a/apps/files_versions/composer/composer/autoload_static.php
+++ b/apps/files_versions/composer/composer/autoload_static.php
@@ -33,7 +33,7 @@ class ComposerStaticInitFiles_Versions
'OCA\\Files_Versions\\Db\\VersionsMapper' => __DIR__ . '/..' . '/../lib/Db/VersionsMapper.php',
'OCA\\Files_Versions\\Events\\CreateVersionEvent' => __DIR__ . '/..' . '/../lib/Events/CreateVersionEvent.php',
'OCA\\Files_Versions\\Expiration' => __DIR__ . '/..' . '/../lib/Expiration.php',
- 'OCA\\Files_Versions\\Hooks' => __DIR__ . '/..' . '/../lib/Hooks.php',
+ 'OCA\\Files_Versions\\Listener\\FileEventsListener' => __DIR__ . '/..' . '/../lib/Listener/FileEventsListener.php',
'OCA\\Files_Versions\\Listener\\LoadAdditionalListener' => __DIR__ . '/..' . '/../lib/Listener/LoadAdditionalListener.php',
'OCA\\Files_Versions\\Listener\\LoadSidebarListener' => __DIR__ . '/..' . '/../lib/Listener/LoadSidebarListener.php',
'OCA\\Files_Versions\\Migration\\Version1020Date20221114144058' => __DIR__ . '/..' . '/../lib/Migration/Version1020Date20221114144058.php',
diff --git a/apps/files_versions/lib/AppInfo/Application.php b/apps/files_versions/lib/AppInfo/Application.php
index 08c49f280af..7ab6d0ddc34 100644
--- a/apps/files_versions/lib/AppInfo/Application.php
+++ b/apps/files_versions/lib/AppInfo/Application.php
@@ -33,7 +33,7 @@ use OCA\DAV\Connector\Sabre\Principal;
use OCA\Files\Event\LoadAdditionalScriptsEvent;
use OCA\Files\Event\LoadSidebar;
use OCA\Files_Versions\Capabilities;
-use OCA\Files_Versions\Hooks;
+use OCA\Files_Versions\Listener\FileEventsListener;
use OCA\Files_Versions\Listener\LoadAdditionalListener;
use OCA\Files_Versions\Listener\LoadSidebarListener;
use OCA\Files_Versions\Versions\IVersionManager;
@@ -105,14 +105,14 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(LoadAdditionalScriptsEvent::class, LoadAdditionalListener::class);
$context->registerEventListener(LoadSidebar::class, LoadSidebarListener::class);
- $context->registerEventListener(BeforeNodeWrittenEvent::class, Hooks::class);
- $context->registerEventListener(NodeWrittenEvent::class, Hooks::class);
- $context->registerEventListener(BeforeNodeDeletedEvent::class, Hooks::class);
- $context->registerEventListener(NodeDeletedEvent::class, Hooks::class);
- $context->registerEventListener(NodeRenamedEvent::class, Hooks::class);
- $context->registerEventListener(NodeCopiedEvent::class, Hooks::class);
- $context->registerEventListener(BeforeNodeRenamedEvent::class, Hooks::class);
- $context->registerEventListener(BeforeNodeCopiedEvent::class, Hooks::class);
+ $context->registerEventListener(BeforeNodeWrittenEvent::class, FileEventsListener::class);
+ $context->registerEventListener(NodeWrittenEvent::class, FileEventsListener::class);
+ $context->registerEventListener(BeforeNodeDeletedEvent::class, FileEventsListener::class);
+ $context->registerEventListener(NodeDeletedEvent::class, FileEventsListener::class);
+ $context->registerEventListener(NodeRenamedEvent::class, FileEventsListener::class);
+ $context->registerEventListener(NodeCopiedEvent::class, FileEventsListener::class);
+ $context->registerEventListener(BeforeNodeRenamedEvent::class, FileEventsListener::class);
+ $context->registerEventListener(BeforeNodeCopiedEvent::class, FileEventsListener::class);
}
public function boot(IBootContext $context): void {
diff --git a/apps/files_versions/lib/Hooks.php b/apps/files_versions/lib/Listener/FileEventsListener.php
index ba22349e221..0633155f7cf 100644
--- a/apps/files_versions/lib/Hooks.php
+++ b/apps/files_versions/lib/Listener/FileEventsListener.php
@@ -27,13 +27,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-namespace OCA\Files_Versions;
+namespace OCA\Files_Versions\Listener;
use OC\Files\Filesystem;
use OC\Files\Mount\MoveableMount;
use OC\Files\View;
use OCA\Files_Versions\Db\VersionEntity;
use OCA\Files_Versions\Db\VersionsMapper;
+use OCA\Files_Versions\Storage;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Files\Events\Node\BeforeNodeCopiedEvent;
@@ -48,7 +49,7 @@ use OCP\Files\Folder;
use OCP\Files\IMimeTypeLoader;
use OCP\Files\Node;
-class Hooks implements IEventListener {
+class FileEventsListener implements IEventListener {
private Folder $userFolder;
private VersionsMapper $versionsMapper;
/**