From 00b33c282511d8f7add1ae9616ec4db27f0893b3 Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Wed, 13 Sep 2023 09:17:03 -0300 Subject: [PATCH] Change the length of the random string appended to segments This commit changes the length of the random string appended to segments created from a template when a segment with the same name already exists. Before the length was 12 and now it is 5. We don't need a very long random string in this case, and the shorter the string the less ugly it is. [MAILPOET-5394] --- mailpoet/lib/Segments/DynamicSegments/SegmentSaveController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailpoet/lib/Segments/DynamicSegments/SegmentSaveController.php b/mailpoet/lib/Segments/DynamicSegments/SegmentSaveController.php index 4782c21a80..0789726507 100644 --- a/mailpoet/lib/Segments/DynamicSegments/SegmentSaveController.php +++ b/mailpoet/lib/Segments/DynamicSegments/SegmentSaveController.php @@ -40,7 +40,7 @@ class SegmentSaveController { $name = $data['name'] ?? ''; if (!$this->segmentsRepository->isNameUnique($name, null) && isset($data['force_creation']) && $data['force_creation'] === 'true') { - $name = $name . ' (' . wp_generate_password(12, false) . ')'; + $name = $name . ' (' . wp_generate_password(5, false) . ')'; } $description = $data['description'] ?? '';