- if(!strcmp($debugOutput,"true")) {
- print "Checking to see if toolkit was found <br>";
- }
- if (isset($toolkit)) {
- $newTmpFile = $platform->tempnam($tmpDir, 'add');
- $newTmpFile.= ".jpg";
- $thumbnailSize = 150;
- list ($ret, $preferences) = GalleryCoreApi::fetchDerivativePreferencesForItem($item->getId());
- if(!$ret) {
- foreach ($preferences as $preference) {
- if (preg_match('/thumbnail\|(\d+)/',
- $preference['derivativeOperations'], $matches)) {
- $thumbnailSize = $matches[1];
- break;
+ $debugString.="Checking to see if a toolkit that can resize images was found. <br>";
+ if (isset($toolkit)) {
+ $newTmpFile = $platform->tempnam($tmpDir, 'add');
+ $newTmpFile.= ".jpg";
+ $thumbnailSize = 150;
+ list ($ret, $preferences) =
+ GalleryCoreApi::fetchDerivativePreferencesForItem($item->getId());
+ if(!$ret) {
+ foreach ($preferences as $preference) {
+ if (preg_match('/thumbnail\|(\d+)/',
+ $preference['derivativeOperations'], $matches)) {
+ $thumbnailSize = $matches[1];
+ $debugString.="Found thumbnail size in album preferences: $thumbnailSize <br>";
+ break;
+ }
+ }