mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-16 11:37:37 +01:00
Merge branch 'master' into develop
This commit is contained in:
@@ -12,6 +12,7 @@ set_defaults() {
|
||||
export SETUP="${SETUP:-}"
|
||||
export PACKAGE_MANAGER="${PACKAGE_MANAGER:-npm}"
|
||||
export OVERRIDE_UPDATE_LOCK="${OVERRIDE_UPDATE_LOCK:-false}"
|
||||
export NODEBB_ADDITIONAL_PLUGINS="${NODEBB_ADDITIONAL_PLUGINS:-}"
|
||||
}
|
||||
|
||||
# Function to check if a directory exists and is writable
|
||||
@@ -172,6 +173,33 @@ debug_log() {
|
||||
echo "DEBUG: $message"
|
||||
}
|
||||
|
||||
install_additional_plugins() {
|
||||
if [[ ! -z ${NODEBB_ADDITIONAL_PLUGINS} ]]; then
|
||||
export START_BUILD="true"
|
||||
for plugin in "${NODEBB_ADDITIONAL_PLUGINS[@]}"; do
|
||||
echo "Installing additional plugin ${plugin}..."
|
||||
case "$PACKAGE_MANAGER" in
|
||||
yarn) yarn install || {
|
||||
echo "Failed to install plugin ${plugin} with yarn"
|
||||
exit 1
|
||||
} ;;
|
||||
npm) npm install || {
|
||||
echo "Failed to install plugin ${plugin} with npm"
|
||||
exit 1
|
||||
} ;;
|
||||
pnpm) pnpm install || {
|
||||
echo "Failed to install plugin ${plugin} with pnpm"
|
||||
exit 1
|
||||
} ;;
|
||||
*)
|
||||
echo "Unknown package manager: $PACKAGE_MANAGER"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# Main function
|
||||
main() {
|
||||
set_defaults
|
||||
@@ -182,12 +210,14 @@ main() {
|
||||
debug_log "PACKAGE_MANAGER: $PACKAGE_MANAGER"
|
||||
debug_log "CONFIG location: $CONFIG"
|
||||
debug_log "START_BUILD: $START_BUILD"
|
||||
debug_log "NODEBB_ADDITIONAL_PLUGINS: ${NODEBB_ADDITIONAL_PLUGINS}"
|
||||
|
||||
if [ -n "$SETUP" ]; then
|
||||
start_setup_session "$CONFIG"
|
||||
fi
|
||||
|
||||
if [ -f "$CONFIG" ]; then
|
||||
install_additional_plugins
|
||||
start_forum "$CONFIG" "$START_BUILD"
|
||||
else
|
||||
start_installation_session "$NODEBB_INIT_VERB" "$CONFIG"
|
||||
|
||||
@@ -203,4 +203,4 @@
|
||||
"url": "https://github.com/barisusakli"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,7 @@ define('forum/groups/details', [
|
||||
case 'toggleOwnership':
|
||||
api[isOwner ? 'del' : 'put'](`/groups/${ajaxify.data.group.slug}/ownership/${uid}`, {}).then(() => {
|
||||
ownerFlagEl.toggleClass('invisible');
|
||||
userRow.attr('data-isowner', isOwner ? '0' : '1');
|
||||
}).catch(alerts.error);
|
||||
break;
|
||||
|
||||
|
||||
@@ -266,8 +266,8 @@ Notes.assert = async (uid, input, options = { skipChecks: false }) => {
|
||||
await Notes.syncUserInboxes(tid, uid);
|
||||
|
||||
if (!hasTid && uid && options.cid) {
|
||||
// New topic via search/post-redirect, have category announce it
|
||||
activitypub.out.announce.topic(tid);
|
||||
// New topic, have category announce it
|
||||
await activitypub.out.announce.topic(tid);
|
||||
}
|
||||
|
||||
return { tid, count };
|
||||
|
||||
@@ -58,13 +58,12 @@ connection.connect = async function (options) {
|
||||
winston.error(err.stack);
|
||||
reject(err);
|
||||
});
|
||||
cxn.on('ready', () => {
|
||||
|
||||
cxn.connect().then(() => {
|
||||
// back-compat with node_redis
|
||||
cxn.batch = cxn.multi;
|
||||
resolve(cxn);
|
||||
});
|
||||
cxn.connect().then(() => {
|
||||
winston.info('Connected to Redis successfully');
|
||||
resolve(cxn);
|
||||
}).catch((err) => {
|
||||
winston.error('Error connecting to Redis:', err);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user