From b34374fcdbe5d2c2e65f1e29893761be383fbc1d Mon Sep 17 00:00:00 2001 From: Michael Procter Date: Sat, 21 Feb 2015 08:52:33 +0000 Subject: [PATCH] Add plugin trigger for before and after server import --- php/modules/Import.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php/modules/Import.php b/php/modules/Import.php index c8313bb..657bf1c 100644 --- a/php/modules/Import.php +++ b/php/modules/Import.php @@ -82,6 +82,8 @@ class Import extends Module { $contains['photos'] = false; $contains['albums'] = false; + $plugins->activate(__METHOD__ . ":before", array($albumID, $path)); + # Get all files $files = glob($path . '/*'); @@ -133,6 +135,8 @@ class Import extends Module { } + $plugins->activate(__METHOD__ . ":after", array($albumID, $path)); + if ($contains['photos']===false&&$contains['albums']===false) return 'Warning: Folder empty or no readable files to process!'; if ($contains['photos']===false&&$contains['albums']===true) return 'Notice: Import only contains albums!'; return true;