mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-19 15:00:22 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6c17d5cae | ||
|
|
c2dfc48dbb | ||
|
|
a99c27e08b | ||
|
|
0cb3a5bd3f |
2
app.js
2
app.js
@@ -94,7 +94,7 @@ function loadConfig() {
|
|||||||
nconf.defaults({
|
nconf.defaults({
|
||||||
base_dir: __dirname,
|
base_dir: __dirname,
|
||||||
themes_path: path.join(__dirname, 'node_modules'),
|
themes_path: path.join(__dirname, 'node_modules'),
|
||||||
upload_url: '/uploads/',
|
upload_url: nconf.get('relative_path') + '/uploads/',
|
||||||
views_dir: path.join(__dirname, 'public/templates')
|
views_dir: path.join(__dirname, 'public/templates')
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
942
npm-shrinkwrap.json
generated
942
npm-shrinkwrap.json
generated
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
|||||||
"name": "nodebb",
|
"name": "nodebb",
|
||||||
"license": "GPLv3 or later",
|
"license": "GPLv3 or later",
|
||||||
"description": "NodeBB Forum",
|
"description": "NodeBB Forum",
|
||||||
"version": "0.5.4",
|
"version": "0.5.5",
|
||||||
"homepage": "http://www.nodebb.org",
|
"homepage": "http://www.nodebb.org",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -39,8 +39,8 @@
|
|||||||
"nodebb-plugin-markdown": "^0.7.0",
|
"nodebb-plugin-markdown": "^0.7.0",
|
||||||
"nodebb-plugin-mentions": "~0.6.0",
|
"nodebb-plugin-mentions": "~0.6.0",
|
||||||
"nodebb-plugin-soundpack-default": "~0.1.1",
|
"nodebb-plugin-soundpack-default": "~0.1.1",
|
||||||
"nodebb-theme-lavender": "~0.1.0",
|
"nodebb-theme-lavender": "0.1.13",
|
||||||
"nodebb-theme-vanilla": "~0.1.0",
|
"nodebb-theme-vanilla": "0.1.30",
|
||||||
"nodebb-widget-essentials": "~0.1.1",
|
"nodebb-widget-essentials": "~0.1.1",
|
||||||
"npm": "^2.1.4",
|
"npm": "^2.1.4",
|
||||||
"passport": "^0.2.1",
|
"passport": "^0.2.1",
|
||||||
|
|||||||
@@ -35,7 +35,22 @@ define('admin/extend/plugins', function() {
|
|||||||
|
|
||||||
Plugins.suggest(pluginID, function(err, payload) {
|
Plugins.suggest(pluginID, function(err, payload) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
require(['semver'], function(semver) {
|
||||||
|
if (payload.version !== 'latest') {
|
||||||
Plugins.toggleInstall(pluginID, payload.version);
|
Plugins.toggleInstall(pluginID, payload.version);
|
||||||
|
} else if (payload.version === 'latest') {
|
||||||
|
bootbox.confirm(
|
||||||
|
'<div class="alert alert-warning"><p><strong>No Compatibility Infomation Found</strong></p><p>This plugin did not specify a specific version for installation given your NodeBB version. Full compatibility cannot be guaranteed, and may cause your NodeBB to no longer start properly.</p></div>' +
|
||||||
|
'<p>In the event that NodeBB cannot boot properly:</p>' +
|
||||||
|
'<pre><code>$ ./nodebb reset plugin="' + pluginID + '"</code></pre>' +
|
||||||
|
'<p>Continue installation of latest version of this plugin?</p>'
|
||||||
|
, function(confirm) {
|
||||||
|
if (confirm) {
|
||||||
|
Plugins.toggleInstall(pluginID, 'latest');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
bootbox.confirm('<p>NodeBB could not reach the package manager, proceed with installation of latest version?</p><div class="alert alert-danger"><strong>Server returned (' + err.status + ')</strong>: ' + err.responseText + '</div>', function(confirm) {
|
bootbox.confirm('<p>NodeBB could not reach the package manager, proceed with installation of latest version?</p><div class="alert alert-danger"><strong>Server returned (' + err.status + ')</strong>: ' + err.responseText + '</div>', function(confirm) {
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
@@ -55,7 +70,7 @@ define('admin/extend/plugins', function() {
|
|||||||
Plugins.suggest(pluginID, function(err, payload) {
|
Plugins.suggest(pluginID, function(err, payload) {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
require(['semver'], function(semver) {
|
require(['semver'], function(semver) {
|
||||||
if (payload.version === 'latest' || semver.gt(payload.version, parent.find('.currentVersion').text())) {
|
if (payload.version !== 'latest' && semver.gt(payload.version, parent.find('.currentVersion').text())) {
|
||||||
btn.attr('disabled', true).find('i').attr('class', 'fa fa-refresh fa-spin');
|
btn.attr('disabled', true).find('i').attr('class', 'fa fa-refresh fa-spin');
|
||||||
socket.emit('admin.plugins.upgrade', {
|
socket.emit('admin.plugins.upgrade', {
|
||||||
id: pluginID,
|
id: pluginID,
|
||||||
@@ -68,6 +83,27 @@ define('admin/extend/plugins', function() {
|
|||||||
parent.find('.currentVersion').text(payload.version);
|
parent.find('.currentVersion').text(payload.version);
|
||||||
btn.remove();
|
btn.remove();
|
||||||
});
|
});
|
||||||
|
} else if (payload.version === 'latest') {
|
||||||
|
bootbox.confirm(
|
||||||
|
'<div class="alert alert-warning"><p><strong>No Compatibility Infomation Found</strong></p><p>This plugin did not specify a specific version for installation given your NodeBB version. Full compatibility cannot be guaranteed, and may cause your NodeBB to no longer start properly.</p></div>' +
|
||||||
|
'<p>In the event that NodeBB cannot boot properly:</p>' +
|
||||||
|
'<pre><code>$ ./nodebb reset plugin="' + pluginID + '"</code></pre>' +
|
||||||
|
'<p>Continue installation of latest version of this plugin?</p>'
|
||||||
|
, function(confirm) {
|
||||||
|
if (confirm) {
|
||||||
|
socket.emit('admin.plugins.upgrade', {
|
||||||
|
id: pluginID,
|
||||||
|
version: payload.version
|
||||||
|
}, function(err) {
|
||||||
|
if (err) {
|
||||||
|
return app.alertError(err.message);
|
||||||
|
}
|
||||||
|
parent.find('.fa-exclamation-triangle').remove();
|
||||||
|
parent.find('.currentVersion').text(payload.version);
|
||||||
|
btn.remove();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
bootbox.alert('<p>Your version of NodeBB (v' + app.config.version + ') is only cleared to upgrade to v' + payload.version + ' of this plugin. Please update your NodeBB if you wish to install a newer version of this plugin.');
|
bootbox.alert('<p>Your version of NodeBB (v' + app.config.version + ') is only cleared to upgrade to v' + payload.version + ' of this plugin. Please update your NodeBB if you wish to install a newer version of this plugin.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ define('composer/uploads', ['composer/preview'], function(preview) {
|
|||||||
text = textarea.val(),
|
text = textarea.val(),
|
||||||
uploadForm = postContainer.find('#fileForm');
|
uploadForm = postContainer.find('#fileForm');
|
||||||
|
|
||||||
uploadForm.attr('action', params.route);
|
uploadForm.attr('action', config.relative_path + params.route);
|
||||||
|
|
||||||
for(var i = 0; i < files.length; ++i) {
|
for(var i = 0; i < files.length; ++i) {
|
||||||
var isImage = files[i].type.match(/image./);
|
var isImage = files[i].type.match(/image./);
|
||||||
@@ -288,7 +288,7 @@ define('composer/uploads', ['composer/preview'], function(preview) {
|
|||||||
spinner = postContainer.find('.topic-thumb-spinner'),
|
spinner = postContainer.find('.topic-thumb-spinner'),
|
||||||
thumbForm = postContainer.find('#thumbForm');
|
thumbForm = postContainer.find('#thumbForm');
|
||||||
|
|
||||||
thumbForm.attr('action', params.route);
|
thumbForm.attr('action', config.relative_path + params.route);
|
||||||
|
|
||||||
thumbForm.off('submit').submit(function() {
|
thumbForm.off('submit').submit(function() {
|
||||||
var csrf = $('#csrf').attr('data-csrf');
|
var csrf = $('#csrf').attr('data-csrf');
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ var db = require('./database'),
|
|||||||
}
|
}
|
||||||
category.name = validator.escape(category.name);
|
category.name = validator.escape(category.name);
|
||||||
category.description = validator.escape(category.description);
|
category.description = validator.escape(category.description);
|
||||||
category.backgroundImage = category.image ? nconf.get('relative_path') + category.image : '';
|
category.backgroundImage = category.image;
|
||||||
category.disabled = parseInt(category.disabled, 10) === 1;
|
category.disabled = parseInt(category.disabled, 10) === 1;
|
||||||
|
|
||||||
next(null, category);
|
next(null, category);
|
||||||
|
|||||||
Reference in New Issue
Block a user