mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
Merge branch 'master' of https://github.com/NodeBB/NodeBB
This commit is contained in:
@@ -60,9 +60,8 @@ var ajaxify = ajaxify || {};
|
|||||||
// Remove trailing slash
|
// Remove trailing slash
|
||||||
url = url.replace(/\/$/, "");
|
url = url.replace(/\/$/, "");
|
||||||
|
|
||||||
if (url.indexOf(RELATIVE_PATH.slice(1)) !== -1) {
|
url = removeRelativePath(url);
|
||||||
url = url.slice(RELATIVE_PATH.length);
|
|
||||||
}
|
|
||||||
var tpl_url = ajaxify.getTemplateMapping(url);
|
var tpl_url = ajaxify.getTemplateMapping(url);
|
||||||
|
|
||||||
var hash = '';
|
var hash = '';
|
||||||
@@ -124,6 +123,13 @@ var ajaxify = ajaxify || {};
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function removeRelativePath(url) {
|
||||||
|
if (url.indexOf(RELATIVE_PATH.slice(1)) !== -1) {
|
||||||
|
url = url.slice(RELATIVE_PATH.length);
|
||||||
|
}
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
ajaxify.refresh = function() {
|
ajaxify.refresh = function() {
|
||||||
ajaxify.go(ajaxify.currentPage);
|
ajaxify.go(ajaxify.currentPage);
|
||||||
};
|
};
|
||||||
@@ -181,6 +187,8 @@ var ajaxify = ajaxify || {};
|
|||||||
};
|
};
|
||||||
|
|
||||||
ajaxify.loadData = function(url, callback) {
|
ajaxify.loadData = function(url, callback) {
|
||||||
|
url = removeRelativePath(url);
|
||||||
|
|
||||||
$(window).trigger('action:ajaxify.loadingData', {url: url});
|
$(window).trigger('action:ajaxify.loadingData', {url: url});
|
||||||
|
|
||||||
if (ajaxify.preloader && ajaxify.preloader[url]) {
|
if (ajaxify.preloader && ajaxify.preloader[url]) {
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ var bcrypt = require('bcryptjs'),
|
|||||||
|
|
||||||
if (user.picture) {
|
if (user.picture) {
|
||||||
if (user.picture === user.uploadedpicture) {
|
if (user.picture === user.uploadedpicture) {
|
||||||
user.picture = nconf.get('relative_path') + user.picture;
|
user.picture = user.picture.indexOf('http') === -1 ? nconf.get('relative_path') + user.picture : user.picture;
|
||||||
} else {
|
} else {
|
||||||
user.picture = User.createGravatarURLFromEmail(user.email);
|
user.picture = User.createGravatarURLFromEmail(user.email);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user