mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 09:25:45 +01:00
Merge remote-tracking branch 'origin/hashtalk' into hashtalk
This commit is contained in:
@@ -131,7 +131,9 @@ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(com
|
||||
}
|
||||
|
||||
var username = getUserName(selectionText ? $(selection.baseNode) : button);
|
||||
|
||||
if (getData(button, 'data-uid') === '0') {
|
||||
username = '';
|
||||
}
|
||||
if (selectionText.length) {
|
||||
composer.addQuote(tid, ajaxify.variables.get('topic_slug'), getData(button, 'data-index'), getData(button, 'data-pid'), topicName, username, selectionText);
|
||||
} else {
|
||||
@@ -201,8 +203,12 @@ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(com
|
||||
post = button.parents('li[data-pid]');
|
||||
|
||||
if (post.length) {
|
||||
username = '@' + post.attr('data-username').replace(/\s/g, '-');
|
||||
username = post.attr('data-username').replace(/\s/g, '-');
|
||||
}
|
||||
if (post.attr('data-uid') !== '0') {
|
||||
username = '@' + username;
|
||||
}
|
||||
|
||||
return username;
|
||||
}
|
||||
|
||||
|
||||
@@ -144,8 +144,16 @@ var fs = require('fs'),
|
||||
return callback(pluginPath.match('nodebb-theme') ? null : err);
|
||||
}
|
||||
|
||||
try {
|
||||
var pluginData = JSON.parse(data),
|
||||
libraryPath, staticDir;
|
||||
} catch (err) {
|
||||
var pluginDir = pluginPath.split(path.sep);
|
||||
pluginDir = pluginDir[pluginDir.length -1];
|
||||
|
||||
winston.error('[plugins/' + pluginDir + '] Plugin not loaded - please check its plugin.json for errors');
|
||||
return callback();
|
||||
}
|
||||
|
||||
/*
|
||||
Starting v0.5.0, `minver` is deprecated in favour of `compatibility`.
|
||||
|
||||
@@ -343,7 +343,11 @@ var async = require('async'),
|
||||
|
||||
next(null, post);
|
||||
});
|
||||
}, callback);
|
||||
}, function(err, posts) {
|
||||
plugins.fireHook('filter:post.getPostSummaryByPids', {posts: posts, uid: uid}, function(err, postData) {
|
||||
callback(err, postData.posts);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user