mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 20:41:17 +01:00
Merge branch 'master' of https://github.com/designcreateplay/NodeBB
This commit is contained in:
11
loader.js
11
loader.js
@@ -44,11 +44,18 @@ var nconf = require('nconf'),
|
||||
|
||||
nconf.argv();
|
||||
|
||||
// Start the daemon!
|
||||
if (nconf.get('d')) {
|
||||
// Check for a still-active NodeBB process
|
||||
if (fs.existsSync(pidFilePath)) {
|
||||
console.log('\n Error: Another NodeBB is already running!');
|
||||
process.exit();
|
||||
try {
|
||||
var pid = fs.readFileSync(pidFilePath, { encoding: 'utf-8' });
|
||||
process.kill(pid, 0);
|
||||
console.log('\n Error: Another NodeBB is already running!');
|
||||
process.exit();
|
||||
} catch (e) {
|
||||
fs.unlinkSync(pidFilePath);
|
||||
}
|
||||
}
|
||||
|
||||
// Initialise logging streams
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"rss": "~0.2.0",
|
||||
"prompt": "~0.2.11",
|
||||
"uglify-js": "~2.4.0",
|
||||
"validator": "~3.2.1",
|
||||
"validator": "^3.4.0",
|
||||
"cron": "~1.0.1",
|
||||
"semver": "~2.2.1",
|
||||
"string": "~1.7.0",
|
||||
|
||||
@@ -303,7 +303,9 @@ define(['uploader'], function(uploader) {
|
||||
}
|
||||
var numResults = results.length,
|
||||
trEl,
|
||||
resultObj;
|
||||
resultObj;
|
||||
|
||||
groupsResultsEl.empty();
|
||||
|
||||
for(var x = 0; x < numResults; x++) {
|
||||
resultObj = results[x];
|
||||
|
||||
@@ -24,9 +24,9 @@ define(function() {
|
||||
|
||||
createSubmitBtn.on('click', function() {
|
||||
var submitObj = {
|
||||
name: createNameEl.val(),
|
||||
description: $('#create-group-desc').val()
|
||||
},
|
||||
name: createNameEl.val(),
|
||||
description: $('#create-group-desc').val()
|
||||
},
|
||||
errorEl = $('#create-modal-error'),
|
||||
errorText;
|
||||
|
||||
@@ -91,8 +91,9 @@ define(function() {
|
||||
groupMembersEl.empty();
|
||||
for (x = 0; x < numMembers; x++) {
|
||||
var memberIcon = $('<li />')
|
||||
.attr('data-uid', groupObj.members[x].uid)
|
||||
.append($('<img />').attr('src', groupObj.members[x].picture))
|
||||
.append($('<span />').attr('data-uid', groupObj.members[x].uid).html(groupObj.members[x].username));
|
||||
.append($('<span />').html(groupObj.members[x].username));
|
||||
groupMembersEl.append(memberIcon);
|
||||
}
|
||||
}
|
||||
@@ -152,7 +153,7 @@ define(function() {
|
||||
uid: uid
|
||||
}, function(err, data) {
|
||||
if (!err) {
|
||||
groupMembersEl.append(userLabel.cloneNode(true));
|
||||
groupMembersEl.append(userLabel.clone(true));
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -164,10 +165,6 @@ define(function() {
|
||||
|
||||
socket.emit('admin.groups.get', gid, function(err, groupObj){
|
||||
if (!err){
|
||||
if (groupObj.name == 'Administrators' && uid == yourid){
|
||||
bootbox.alert('You cannot remove yourself from the Administrator Group');
|
||||
return;
|
||||
}
|
||||
bootbox.confirm('Are you sure you want to remove this user?', function(confirm) {
|
||||
if (confirm){
|
||||
socket.emit('admin.groups.leave', {
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
<script>
|
||||
var RELATIVE_PATH = "{relative_path}";
|
||||
</script>
|
||||
<script src="{relative_path}/socket.io/socket.io.js"></script>
|
||||
<!-- BEGIN clientScripts -->
|
||||
<script src="{relative_path}/{clientScripts.script}?{cache-buster}"></script>
|
||||
<!-- END clientScripts -->
|
||||
|
||||
@@ -278,9 +278,6 @@ var fs = require('fs'),
|
||||
// Remove scripts that could not be found (remove this line at v0.5.0)
|
||||
Meta.js.scripts = jsPaths.filter(function(path) { return path !== null });
|
||||
|
||||
// Add socket.io client library
|
||||
Meta.js.scripts.push(path.join(__dirname, '../node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js'));
|
||||
|
||||
// Add plugin scripts
|
||||
Meta.js.scripts = Meta.js.scripts.concat(plugins.clientScripts);
|
||||
|
||||
|
||||
@@ -864,6 +864,12 @@ Upgrade.upgrade = function(callback) {
|
||||
if(err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
// If there was no order present, put it at the end
|
||||
if (!order) {
|
||||
order = cids.length;
|
||||
}
|
||||
|
||||
db.sortedSetAdd('categories:cid', order, cid, next);
|
||||
});
|
||||
}, function(err) {
|
||||
|
||||
Reference in New Issue
Block a user