Browse Source

Merge branch 'master' into v3.0.0

Tobias Reich 9 years ago
parent
commit
083e0962e2
2 changed files with 12 additions and 1 deletions
  1. 10 0
      php/modules/Import.php
  2. 2 1
      plugins/check/index.php

+ 10 - 0
php/modules/Import.php

@@ -82,6 +82,11 @@ class Import extends Module {
 		$contains['photos']	= false;
 		$contains['albums']	= false;
 
+		# Invoke plugins directly, as instance method not valid here
+		# Note that updated albumId and path explicitly passed, rather
+		# than using func_get_args() which will only return original ones
+		$plugins->activate(__METHOD__ . ":before", array($albumID, $path));
+
 		# Get all files
 		$files = glob($path . '/*');
 
@@ -133,6 +138,11 @@ class Import extends Module {
 
 		}
 
+		# Invoke plugins directly, as instance method not valid here
+		# Note that updated albumId and path explicitly passed, rather
+		# than using func_get_args() which will only return original ones
+		$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;

+ 2 - 1
plugins/check/index.php

@@ -117,5 +117,6 @@ echo('Imagick:         ' . $imagick . PHP_EOL);
 echo('Imagick Active:  ' . $settings['imagick'] . PHP_EOL);
 echo('Imagick Version: ' . $imagickVersion . PHP_EOL);
 echo('GD Version:      ' . $gdVersion['GD Version'] . PHP_EOL);
+echo('Plugins:         ' . $settings['plugins'] . PHP_EOL);
 
-?>
+?>