mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 05:55:48 +01:00
fixed #2732 -- group creation now using language keys, and no longer succeeds if a group by the name of 'guest' is created.
This commit is contained in:
@@ -71,6 +71,7 @@
|
||||
trimTrailingDash: /-$/g,
|
||||
trimLeadingDash: /^-/g,
|
||||
isLatin: /^[\w]+$/,
|
||||
languageKeyRegex: /\[\[[\w]+:.+\]\]/,
|
||||
|
||||
//http://dense13.com/blog/2009/05/03/converting-string-to-slug-javascript/
|
||||
slugify: function(str) {
|
||||
@@ -108,6 +109,10 @@
|
||||
return !isNaN(parseFloat(n)) && isFinite(n);
|
||||
},
|
||||
|
||||
hasLanguageKey: function(input) {
|
||||
return utils.languageKeyRegex.test(input);
|
||||
},
|
||||
|
||||
// shallow objects merge
|
||||
merge: function() {
|
||||
var result = {}, obj, keys;
|
||||
|
||||
Reference in New Issue
Block a user