Node.js based forum software built for the modern web
fix group name
Barış Soner Uşaklıd225951027e7
diff --git a/public/src/admin/manage/group.js b/public/src/admin/manage/group.jsindex 32ea48fb11..44c5a87eb1 100644--- a/public/src/admin/manage/group.js+++ b/public/src/admin/manage/group.js@@ -18,7 +18,7 @@ define('admin/manage/group', [searchDelay;- var groupName = ajaxify.data.group.name;+ var groupName = decodeURIComponent(ajaxify.data.group.nameEncoded);changeGroupUserTitle.keyup(function() {groupLabelPreview.text(changeGroupUserTitle.val());diff --git a/public/src/client/groups/details.js b/public/src/client/groups/details.jsindex 96d2d296fd..463fc84cb6 100644--- a/public/src/client/groups/details.js+++ b/public/src/client/groups/details.js@@ -7,11 +7,14 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrol};var searchInterval;+ var groupName;Details.init = function() {var detailsPage = components.get('groups/container'),settingsFormEl = detailsPage.find('form');+ groupName = decodeURIComponent(ajaxify.data.group.nameEncoded);+if (ajaxify.data.group.isOwner) {Details.prepareSettings();Details.initialiseCover();@@ -34,7 +37,7 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrolcase 'toggleOwnership':socket.emit('groups.' + (isOwner ? 'rescind' : 'grant'), {toUid: uid,- groupName: ajaxify.data.group.name+ groupName: groupName}, function(err) {if (!err) {ownerFlagEl.toggleClass('invisible');@@ -47,7 +50,7 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrolcase 'kick':socket.emit('groups.kick', {uid: uid,- groupName: ajaxify.data.group.name+ groupName: groupName}, function(err) {if (!err) {userRow.slideUp().remove();@@ -75,7 +78,7 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrolcase 'rejectAll':socket.emit('groups.' + action, {toUid: uid,- groupName: ajaxify.data.group.name+ groupName: groupName}, function(err) {if (!err) {ajaxify.refresh();@@ -156,7 +159,7 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrol});socket.emit('groups.update', {- groupName: ajaxify.data.group.name,+ groupName: groupName,values: settings}, function(err) {if (err) {@@ -178,15 +181,15 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrol};Details.deleteGroup = function() {- bootbox.confirm('Are you sure you want to delete the group: ' + utils.escapeHTML(ajaxify.data.group.name), function(confirm) {+ bootbox.confirm('Are you sure you want to delete the group: ' + utils.escapeHTML(groupName), function(confirm) {if (confirm) {bootbox.prompt('Please enter the name of this group in order to delete it:', function(response) {- if (response === ajaxify.data.group.name) {+ if (response === groupName) {socket.emit('groups.delete', {- groupName: ajaxify.data.group.name+ groupName: groupName}, function(err) {if (!err) {- app.alertSuccess('[[groups:event.deleted, ' + utils.escapeHTML(ajaxify.data.group.name) + ']]');+ app.alertSuccess('[[groups:event.deleted, ' + utils.escapeHTML(groupName) + ']]');ajaxify.go('groups');} else {app.alertError(err.message);@@ -218,7 +221,7 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrolDetails.cover.load = function() {socket.emit('groups.cover.get', {- groupName: ajaxify.data.group.name+ groupName: groupName}, function(err, data) {if (!err) {var coverEl = components.get('groups/cover');@@ -267,7 +270,7 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrolcoverEl.addClass('saving');socket.emit('groups.cover.update', {- groupName: ajaxify.data.group.name,+ groupName: groupName,imageData: Details.cover.newCover || undefined,position: components.get('groups/cover').css('background-position')}, function(err) {@@ -294,7 +297,7 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrol}searchInterval = setTimeout(function() {- socket.emit('groups.searchMembers', {groupName: ajaxify.data.group.name, query: query}, function(err, results) {+ socket.emit('groups.searchMembers', {groupName: groupName, query: query}, function(err, results) {if (err) {return app.alertError(err.message);}@@ -324,13 +327,15 @@ define('forum/groups/details', ['iconSelect', 'components', 'forum/infinitescrol}function loadMoreMembers() {+var members = $('[component="groups/members"]');if (members.attr('loading')) {return;}+members.attr('loading', 1);socket.emit('groups.loadMoreMembers', {- groupName: ajaxify.data.group.name,+ groupName: groupName,after: members.attr('data-nextstart')}, function(err, data) {if (err) {