Add plugin trigger for before and after server import
This commit is contained in:
parent
f22966a280
commit
b34374fcdb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user