Add plugin trigger for before and after server import

This commit is contained in:
Michael Procter 2015-02-21 08:52:33 +00:00
parent f22966a280
commit b34374fcdb

View File

@ -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;