Fixed naming
This commit is contained in:
parent
edcf71deba
commit
9a5f755c75
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue