mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-26 18:30:20 +01:00
fix relative_path image url for sub installs
This commit is contained in:
@@ -438,7 +438,7 @@ accountsController.uploadPicture = function (req, res, next) {
|
||||
|
||||
user.setUserFields(updateUid, {uploadedpicture: image.url, picture: image.url});
|
||||
|
||||
res.json([{name: userPhoto.name, url: image.url}]);
|
||||
res.json([{name: userPhoto.name, url: nconf.get('relative_path') + image.url}]);
|
||||
}
|
||||
|
||||
if (err) {
|
||||
|
||||
@@ -119,7 +119,7 @@ var async = require('async'),
|
||||
|
||||
if (user.picture) {
|
||||
if (user.picture === user.uploadedpicture) {
|
||||
user.picture = user.picture.indexOf('http') === -1 ? nconf.get('relative_path') + user.picture : user.picture;
|
||||
user.picture = user.uploadedpicture = user.picture.indexOf('http') === -1 ? nconf.get('relative_path') + user.picture : user.picture;
|
||||
} else {
|
||||
user.picture = User.createGravatarURLFromEmail(user.email);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user