mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
Resolve merge conflicts, minify only .js files
This commit is contained in:
@@ -27,6 +27,7 @@ editController.get = function (req, res, callback) {
|
||||
userData.maximumProfileImageSize = parseInt(meta.config.maximumProfileImageSize, 10);
|
||||
userData.allowProfileImageUploads = parseInt(meta.config.allowProfileImageUploads, 10) === 1;
|
||||
userData.allowAccountDelete = parseInt(meta.config.allowAccountDelete, 10) === 1;
|
||||
userData.profileImageDimension = parseInt(meta.config.profileImageDimension, 10) || 128;
|
||||
|
||||
userData.groups = userData.groups.filter(function (group) {
|
||||
return group && group.userTitleEnabled && !groups.isPrivilegeGroup(group.name) && group.name !== 'registered-users';
|
||||
@@ -36,7 +37,15 @@ editController.get = function (req, res, callback) {
|
||||
});
|
||||
|
||||
userData.title = '[[pages:account/edit, ' + userData.username + ']]';
|
||||
userData.breadcrumbs = helpers.buildBreadcrumbs([{ text: userData.username, url: '/user/' + userData.userslug }, { text: '[[user:edit]]' }]);
|
||||
userData.breadcrumbs = helpers.buildBreadcrumbs([
|
||||
{
|
||||
text: userData.username,
|
||||
url: '/user/' + userData.userslug,
|
||||
},
|
||||
{
|
||||
text: '[[user:edit]]',
|
||||
},
|
||||
]);
|
||||
userData.editButtons = [];
|
||||
|
||||
plugins.fireHook('filter:user.account.edit', userData, function (err, userData) {
|
||||
@@ -76,9 +85,17 @@ function renderRoute(name, req, res, next) {
|
||||
|
||||
userData.title = '[[pages:account/edit/' + name + ', ' + userData.username + ']]';
|
||||
userData.breadcrumbs = helpers.buildBreadcrumbs([
|
||||
{ text: userData.username, url: '/user/' + userData.userslug },
|
||||
{ text: '[[user:edit]]', url: '/user/' + userData.userslug + '/edit' },
|
||||
{ text: '[[user:' + name + ']]' },
|
||||
{
|
||||
text: userData.username,
|
||||
url: '/user/' + userData.userslug,
|
||||
},
|
||||
{
|
||||
text: '[[user:edit]]',
|
||||
url: '/user/' + userData.userslug + '/edit',
|
||||
},
|
||||
{
|
||||
text: '[[user:' + name + ']]',
|
||||
},
|
||||
]);
|
||||
|
||||
res.render('account/edit/' + name, userData);
|
||||
@@ -139,7 +156,10 @@ editController.uploadPicture = function (req, res, next) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
res.json([{ name: userPhoto.name, url: image.url.startsWith('http') ? image.url : nconf.get('relative_path') + image.url }]);
|
||||
res.json([{
|
||||
name: userPhoto.name,
|
||||
url: image.url.startsWith('http') ? image.url : nconf.get('relative_path') + image.url,
|
||||
}]);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -154,7 +174,9 @@ editController.uploadCoverPicture = function (req, res, next) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
res.json([{ url: image.url }]);
|
||||
res.json([{
|
||||
url: image.url,
|
||||
}]);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user