aboutsummaryrefslogtreecommitdiffstats
path: root/community/nextcloud/iconv-ascii-translit-not-supported.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/nextcloud/iconv-ascii-translit-not-supported.patch')
-rw-r--r--community/nextcloud/iconv-ascii-translit-not-supported.patch18
1 files changed, 8 insertions, 10 deletions
diff --git a/community/nextcloud/iconv-ascii-translit-not-supported.patch b/community/nextcloud/iconv-ascii-translit-not-supported.patch
index 8c0825d4fe..f599a1b020 100644
--- a/community/nextcloud/iconv-ascii-translit-not-supported.patch
+++ b/community/nextcloud/iconv-ascii-translit-not-supported.patch
@@ -1,13 +1,11 @@
-iconv on Alpine does not support conversion to ASCII//TRANSLIT
-
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
-@@ -1200,7 +1200,7 @@
+@@ -1318,7 +1318,7 @@
+ }
- // Transliteration
- // latin characters to ASCII
-- $name = iconv('UTF-8', 'ASCII//TRANSLIT', $name);
-+ $name = iconv('UTF-8', 'ASCII', $name);
-
- // Replacements
- $name = str_replace(' ', '_', $name);
+ // Transliteration to ASCII
+- $transliterated = @iconv('UTF-8', 'ASCII//TRANSLIT', $name);
++ $transliterated = @iconv('UTF-8', 'ASCII', $name);
+ if($transliterated !== false) {
+ // depending on system config iconv can work or not
+ $name = $transliterated;