Fixed naming

This commit is contained in:
luca.frosini 2023-09-05 15:57:39 +02:00
parent edcf71deba
commit 9a5f755c75
1 changed files with 4 additions and 4 deletions

View File

@ -44,12 +44,12 @@ public class CKANGroup extends CKAN {
PURGE = GROUP_PURGE;
}
public static String fromGroupTitleToName(String groupName) {
if(groupName == null)
public static String fromGroupTitleToName(String groupTitle) {
if(groupTitle == null)
return null;
String regexGroupNameTransform = "[^A-Za-z0-9-]";
String modified = groupName.trim().replaceAll(regexGroupNameTransform, "-").replaceAll("-+", "-").toLowerCase();
String regexGroupTitleTransform = "[^A-Za-z0-9-]";
String modified = groupTitle.trim().replaceAll(regexGroupTitleTransform, "-").replaceAll("-+", "-").toLowerCase();
if(modified.startsWith("-"))
modified = modified.substring(1);