diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-03-13 09:05:40 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-03-13 09:05:40 +0100 |
commit | 150e238b02b442bc528b9626ef01215a18901995 (patch) | |
tree | 28ad5a3e395666f475aa2a8c7f417d172b828763 /Zotlabs/Module/New_channel.php | |
parent | b265a55b815e46658aadec9021bb00997cb40bc7 (diff) | |
parent | ab1d47b36f21e5881900d9d805f4f7876f1c472f (diff) | |
download | volse-hubzilla-150e238b02b442bc528b9626ef01215a18901995.tar.gz volse-hubzilla-150e238b02b442bc528b9626ef01215a18901995.tar.bz2 volse-hubzilla-150e238b02b442bc528b9626ef01215a18901995.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Module/New_channel.php')
-rw-r--r-- | Zotlabs/Module/New_channel.php | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/Zotlabs/Module/New_channel.php b/Zotlabs/Module/New_channel.php index 548f28c4f..ea9f27447 100644 --- a/Zotlabs/Module/New_channel.php +++ b/Zotlabs/Module/New_channel.php @@ -16,8 +16,15 @@ class New_channel extends \Zotlabs\Web\Controller { require_once('library/urlify/URLify.php'); $result = array('error' => false, 'message' => ''); $n = trim($_REQUEST['name']); - - $x = strtolower(\URLify::transliterate($n)); + + $x = false; + + if(get_config('system','unicode_usernames')) { + $x = punify(mb_strtolower($n)); + } + + if((! $x) || strlen($x) > 64) + $x = strtolower(\URLify::transliterate($n)); $test = array(); @@ -43,7 +50,14 @@ class New_channel extends \Zotlabs\Web\Controller { $result = array('error' => false, 'message' => ''); $n = trim($_REQUEST['nick']); - $x = strtolower(\URLify::transliterate($n)); + $x = false; + + if(get_config('system','unicode_usernames')) { + $x = punify(mb_strtolower($n)); + } + + if((! $x) || strlen($x) > 64) + $x = strtolower(\URLify::transliterate($n)); $test = array(); |