Fixed naming
This commit is contained in:
parent
edcf71deba
commit
9a5f755c75
|
@ -44,12 +44,12 @@ public class CKANGroup extends CKAN {
|
||||||
PURGE = GROUP_PURGE;
|
PURGE = GROUP_PURGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String fromGroupTitleToName(String groupName) {
|
public static String fromGroupTitleToName(String groupTitle) {
|
||||||
if(groupName == null)
|
if(groupTitle == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
String regexGroupNameTransform = "[^A-Za-z0-9-]";
|
String regexGroupTitleTransform = "[^A-Za-z0-9-]";
|
||||||
String modified = groupName.trim().replaceAll(regexGroupNameTransform, "-").replaceAll("-+", "-").toLowerCase();
|
String modified = groupTitle.trim().replaceAll(regexGroupTitleTransform, "-").replaceAll("-+", "-").toLowerCase();
|
||||||
|
|
||||||
if(modified.startsWith("-"))
|
if(modified.startsWith("-"))
|
||||||
modified = modified.substring(1);
|
modified = modified.substring(1);
|
||||||
|
|
Loading…
Reference in New Issue