diff --git a/system/modules/isotope/docs/CHANGELOG-2.5.md b/system/modules/isotope/docs/CHANGELOG-2.5.md
index 58e01a8412..4aac33b335 100644
--- a/system/modules/isotope/docs/CHANGELOG-2.5.md
+++ b/system/modules/isotope/docs/CHANGELOG-2.5.md
@@ -1,6 +1,15 @@
Isotope eCommerce Changelog
===========================
+
+Version 2.5.14-stable (2019-06-11)
+---------------------------------
+
+- Fixed moving files after order for regular upload attributes
+- Fixed moving files to member homedir after order is complete (#1996)
+- Removed file hash from upload file names
+
+
Version 2.5.13-stable (2019-05-29)
----------------------------------
diff --git a/system/modules/isotope/languages/de/tl_iso_payment.xlf b/system/modules/isotope/languages/de/tl_iso_payment.xlf
index 66e56e0e6a..20a5f9947b 100644
--- a/system/modules/isotope/languages/de/tl_iso_payment.xlf
+++ b/system/modules/isotope/languages/de/tl_iso_payment.xlf
@@ -179,7 +179,7 @@
Client ID
- Kundennummer
+ Kundennummer (Client ID)
Enter your PayPal Client ID. You must create an application on the PayPal portal to get the access details.
@@ -187,7 +187,7 @@
Secret
- Schlüssel
+ Schlüssel (Secret)
Enter your PayPal API secret.
diff --git a/system/modules/isotope/languages/sl/tl_iso_attribute.xlf b/system/modules/isotope/languages/sl/tl_iso_attribute.xlf
index b71bd046cc..4a16b08dab 100644
--- a/system/modules/isotope/languages/sl/tl_iso_attribute.xlf
+++ b/system/modules/isotope/languages/sl/tl_iso_attribute.xlf
@@ -364,6 +364,7 @@
E-mail address
+ E-Poštni naslov
Checks whether the input is a valid e-mail address.
diff --git a/system/modules/isotope/languages/sl/tl_iso_config.xlf b/system/modules/isotope/languages/sl/tl_iso_config.xlf
index c9eb416f23..7d8fe0268c 100644
--- a/system/modules/isotope/languages/sl/tl_iso_config.xlf
+++ b/system/modules/isotope/languages/sl/tl_iso_config.xlf
@@ -47,6 +47,7 @@
Please enter a VAT number.
+ Vnesite davčno številko.
Street
@@ -54,6 +55,7 @@
Please enter the street name and the street number.
+ Vnesite naslov.
Street 2
@@ -61,6 +63,7 @@
Enter a second street info if there's any.
+ Vnesite naslov.
Street 3
@@ -68,6 +71,7 @@
Enter a third street info if there's any.
+ Vnesite naslov.
Postal code
@@ -75,6 +79,7 @@
Please enter the postal code.
+ Vnesite poštno številko.
City
@@ -82,12 +87,15 @@
Please enter the name of the city.
+ Vnesite kraj.
State
+ Regija
Please enter the name of the state.
+ Vnesite regijo.
Country
@@ -102,12 +110,14 @@
Please enter the phone number.
+ Vnesite telefonsko številko.
Shipping email address
Please enter a valid e-mail address.
+ Vnesite e-poštni naslov.
Address fields
diff --git a/system/modules/isotope/library/Isotope/EventListener/PostCheckoutUploads.php b/system/modules/isotope/library/Isotope/EventListener/PostCheckoutUploads.php
index df77e240c9..0130b4943d 100644
--- a/system/modules/isotope/library/Isotope/EventListener/PostCheckoutUploads.php
+++ b/system/modules/isotope/library/Isotope/EventListener/PostCheckoutUploads.php
@@ -49,31 +49,12 @@ public function onPostCheckout(IsotopeOrderableCollection $order)
continue;
}
- foreach ($value as $i => $source) {
- $tokens = $this->generateTokens($order, $item, $position, $total, $attribute, $source);
-
- $targetFolder = StringUtil::recursiveReplaceTokensAndTags(
- $attribute->checkoutTargetFolder,
- $tokens,
- StringUtil::NO_TAGS | StringUtil::NO_BREAKS
- );
-
- if ($attribute->doNotOverwrite) {
- $tokens['file_target'] = FileUpload::getFileName($tokens['file_name'], $targetFolder);
- } else {
- $tokens['file_target'] = $tokens['file_name'];
+ if (\is_array($value)) {
+ foreach ($value as $i => $source) {
+ $value[$i] = $this->renameFile($order, $item, $position, $total, $attribute, $source);
}
-
- $targetFile = StringUtil::recursiveReplaceTokensAndTags(
- $attribute->checkoutTargetFile,
- $tokens,
- StringUtil::NO_TAGS | StringUtil::NO_BREAKS
- );
-
- $file = new File($source);
- $file->renameTo($targetFolder . '/' . $targetFile);
-
- $value[$i] = $targetFolder . '/' . $targetFile;
+ } else {
+ $value = $this->renameFile($order, $item, $position, $total, $attribute, $value);
}
$configuration[$attributeName] = $value;
@@ -126,10 +107,38 @@ private function generateTokens(IsotopeOrderableCollection $order, $item, $posit
if ($userData['assignDir']) {
$homeDir = FilesModel::findByPk($userData['homeDir']);
- $tokens['member_homeDir'] = null === $homeDir ? $homeDir->path : '';
+ $tokens['member_homeDir'] = null !== $homeDir ? $homeDir->path : '';
}
}
return $tokens;
}
+
+ private function renameFile(IsotopeOrderableCollection $order, $item, $position, $total, $attribute, $source)
+ {
+ $tokens = $this->generateTokens($order, $item, $position, $total, $attribute, $source);
+
+ $targetFolder = StringUtil::recursiveReplaceTokensAndTags(
+ $attribute->checkoutTargetFolder,
+ $tokens,
+ StringUtil::NO_TAGS | StringUtil::NO_BREAKS
+ );
+
+ if ($attribute->doNotOverwrite) {
+ $tokens['file_target'] = FileUpload::getFileName($tokens['file_name'], $targetFolder);
+ } else {
+ $tokens['file_target'] = $tokens['file_name'];
+ }
+
+ $targetFile = StringUtil::recursiveReplaceTokensAndTags(
+ $attribute->checkoutTargetFile,
+ $tokens,
+ StringUtil::NO_TAGS | StringUtil::NO_BREAKS
+ );
+
+ $file = new File($source);
+ $file->renameTo($targetFolder . '/' . $targetFile);
+
+ return $targetFolder . '/' . $targetFile;
+ }
}
diff --git a/system/modules/isotope/library/Isotope/Isotope.php b/system/modules/isotope/library/Isotope/Isotope.php
index ae8f5870b8..329114ad75 100644
--- a/system/modules/isotope/library/Isotope/Isotope.php
+++ b/system/modules/isotope/library/Isotope/Isotope.php
@@ -44,7 +44,7 @@ class Isotope extends \Controller
/**
* Isotope version
*/
- const VERSION = '2.5.13';
+ const VERSION = '2.5.14';
/**
* True if the system has been initialized
diff --git a/system/modules/isotope/library/Isotope/Model/Attribute/Upload.php b/system/modules/isotope/library/Isotope/Model/Attribute/Upload.php
index 8dfbce42e6..0be616821a 100644
--- a/system/modules/isotope/library/Isotope/Model/Attribute/Upload.php
+++ b/system/modules/isotope/library/Isotope/Model/Attribute/Upload.php
@@ -100,7 +100,6 @@ public function processFiles($value, IsotopeProduct $product, \Widget $widget)
$folder = new Folder('isotope/uploads');
$folder->protect();
- $file = substr(md5_file($temp), 0, 8) . '-' . $file;
$file = FileUpload::getFileName($file, $folder->path);
$file = $folder->path . '/' . $file;