mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-16 13:30:23 +01:00
Compare commits
7 Commits
socket-not
...
v0.7.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43b90c5679 | ||
|
|
58b8c32fe9 | ||
|
|
1b88a6a523 | ||
|
|
8ecd90729e | ||
|
|
a5b8a656e9 | ||
|
|
2cae7995e7 | ||
|
|
19ca796915 |
13
app.js
13
app.js
@@ -108,6 +108,7 @@ function loadConfig() {
|
||||
|
||||
function start() {
|
||||
loadConfig();
|
||||
var db = require('./src/database');
|
||||
|
||||
// nconf defaults, if not set in config
|
||||
if (!nconf.get('upload_path')) {
|
||||
@@ -175,9 +176,8 @@ function start() {
|
||||
});
|
||||
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
require('./src/database').init(next);
|
||||
},
|
||||
async.apply(db.init),
|
||||
async.apply(db.checkCompatibility),
|
||||
function(next) {
|
||||
require('./src/meta').configs.init(next);
|
||||
},
|
||||
@@ -203,7 +203,12 @@ function start() {
|
||||
}
|
||||
], function(err) {
|
||||
if (err) {
|
||||
winston.error(err.stack);
|
||||
if (err.stacktrace !== false) {
|
||||
winston.error(err.stack);
|
||||
} else {
|
||||
winston.error(err.message);
|
||||
}
|
||||
|
||||
process.exit();
|
||||
}
|
||||
});
|
||||
|
||||
3269
npm-shrinkwrap.json
generated
Normal file
3269
npm-shrinkwrap.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
"name": "nodebb",
|
||||
"license": "GPLv3 or later",
|
||||
"description": "NodeBB Forum",
|
||||
"version": "0.7.0-dev",
|
||||
"version": "0.7.0",
|
||||
"homepage": "http://www.nodebb.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -41,7 +41,7 @@
|
||||
"nodebb-plugin-dbsearch": "^0.2.12",
|
||||
"nodebb-plugin-emoji-extended": "^0.4.8",
|
||||
"nodebb-plugin-markdown": "^2.1.7",
|
||||
"nodebb-plugin-mentions": "^0.11.2",
|
||||
"nodebb-plugin-mentions": "^0.11.4",
|
||||
"nodebb-plugin-soundpack-default": "^0.1.1",
|
||||
"nodebb-plugin-spam-be-gone": "^0.4.0",
|
||||
"nodebb-theme-lavender": "^1.0.42",
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
"titles": "العناوين",
|
||||
"titles-posts": "العناوين والمشاركات",
|
||||
"posted-by": "Posted by",
|
||||
"in-categories": "In Categories",
|
||||
"search-child-categories": "Search child categories",
|
||||
"in-categories": "في الفئات",
|
||||
"search-child-categories": "بحث في الفئات الفرعية",
|
||||
"reply-count": "Reply Count",
|
||||
"at-least": "At least",
|
||||
"at-most": "At most",
|
||||
"post-time": "Post time",
|
||||
"post-time": "تاريخ المشاركة",
|
||||
"newer-than": "أحدث من",
|
||||
"older-than": "أقدم من",
|
||||
"any-date": "أي وقت",
|
||||
@@ -29,7 +29,7 @@
|
||||
"number-of-views": "عدد المشاهدات",
|
||||
"topic-start-date": "تاريخ بدأ الموضوع",
|
||||
"username": "اسم المستخدم",
|
||||
"category": "Category",
|
||||
"category": "فئة",
|
||||
"descending": "In descending order",
|
||||
"ascending": "In ascending order",
|
||||
"save-preferences": "حفظ التفضيلات",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"no_topics_found": "لا توجد مواضيع !",
|
||||
"no_posts_found": "لا توجد مشاركات!",
|
||||
"post_is_deleted": "هذه المشاركة محذوفة!",
|
||||
"topic_is_deleted": "This topic is deleted!",
|
||||
"topic_is_deleted": "هذا الموضوع محذوف",
|
||||
"profile": "الملف الشخصي",
|
||||
"posted_by": "كتب من طرف %1",
|
||||
"posted_by_guest": "كتب من طرف زائر",
|
||||
@@ -96,5 +96,5 @@
|
||||
"oldest_to_newest": "من الأقدم إلى الأحدث",
|
||||
"newest_to_oldest": "من الأحدث إلى الأقدم",
|
||||
"most_votes": "الأكثر تصويتًا",
|
||||
"most_posts": "Most posts"
|
||||
"most_posts": "اﻷكثر رداً"
|
||||
}
|
||||
@@ -30,11 +30,11 @@
|
||||
"unfollow": "Dejar de seguir",
|
||||
"more": "Más",
|
||||
"profile_update_success": "¡El perfil ha sido actualizado correctamente!",
|
||||
"change_picture": "Cambiar imágen",
|
||||
"change_picture": "Cambiar imagen",
|
||||
"edit": "Editar",
|
||||
"uploaded_picture": "Imágen subida",
|
||||
"upload_new_picture": "Subir nueva imágen",
|
||||
"upload_new_picture_from_url": "Cargar imágen desde una URL",
|
||||
"uploaded_picture": "Imagen subida",
|
||||
"upload_new_picture": "Subir nueva imagen",
|
||||
"upload_new_picture_from_url": "Cargar imagen desde una URL",
|
||||
"current_password": "Contraseña actual",
|
||||
"change_password": "Cambiar contraseña",
|
||||
"change_password_error": "¡Contraseña no válida!",
|
||||
|
||||
@@ -32,5 +32,5 @@
|
||||
"details.hidden": "Masqué",
|
||||
"details.hidden_help": "Si cette case est cochée, ce groupe n'est pas affiché dans la liste des groupes, et les utilisateurs devront être invités manuellement.",
|
||||
"event.updated": "Les détails du groupe ont été mis à jour",
|
||||
"event.deleted": "Le groupe é%1\" a été supprimé"
|
||||
"event.deleted": "Le groupe \"%1\" a été supprimé"
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"invalid-data": "Dados Inválidos",
|
||||
"not-logged-in": "Você não parece estar logado.",
|
||||
"account-locked": "Sua conta foi temporariamente bloqueada ",
|
||||
"search-requires-login": "Searching requires an account - please login or register.",
|
||||
"search-requires-login": "É necessário ter uma conta para realizar buscas - por favor efetue o login ou cadastre-se.",
|
||||
"invalid-cid": "ID de Categoria Inválido",
|
||||
"invalid-tid": "ID de Tópico Inválido",
|
||||
"invalid-pid": "ID de Post Inválido",
|
||||
@@ -21,11 +21,11 @@
|
||||
"email-not-confirmed-chat": "Você não está habilitado a conversar até que seu email seja confirmado, por favor clique aqui para confirmar seu email.",
|
||||
"no-email-to-confirm": "Este fórum exige confirmação de email, por gentileza clique aqui para digitar um email",
|
||||
"email-confirm-failed": "Nós não pudemos confirmar seu email, por gentileza tente novamente mais tarde.",
|
||||
"confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.",
|
||||
"confirm-email-already-sent": "O email de confirmação já foi enviado, por favor aguarde %1 minuto(s) para enviar outro.",
|
||||
"username-too-short": "Nome de usuário muito curto",
|
||||
"username-too-long": "Nome de usuário muito longo",
|
||||
"user-banned": "Usuário banido",
|
||||
"user-too-new": "Sorry, you are required to wait %1 second(s) before making your first post",
|
||||
"user-too-new": "Desculpe, é necessário que você aguarde %1 segundo(s) antes de fazer seu primeiro post.",
|
||||
"no-category": "A categoria não existe",
|
||||
"no-topic": "O tópico não existe",
|
||||
"no-post": "O post não existe",
|
||||
@@ -36,17 +36,17 @@
|
||||
"no-emailers-configured": "Nenhum plugin de email foi carregado, por isso um email de teste não pôde ser enviado",
|
||||
"category-disabled": "Categoria desativada",
|
||||
"topic-locked": "Tópico Trancado",
|
||||
"post-edit-duration-expired": "You are only allowed to edit posts for %1 second(s) after posting",
|
||||
"post-edit-duration-expired": "Você só pode editar posts %1 segundo(s) após postar.",
|
||||
"still-uploading": "Aguarde a conclusão dos uploads.",
|
||||
"content-too-short": "Please enter a longer post. Posts should contain at least %1 character(s).",
|
||||
"content-too-long": "Please enter a shorter post. Posts can't be longer than %1 character(s).",
|
||||
"title-too-short": "Please enter a longer title. Titles should contain at least %1 character(s).",
|
||||
"title-too-long": "Please enter a shorter title. Titles can't be longer than %1 character(s).",
|
||||
"too-many-posts": "You can only post once every %1 second(s) - please wait before posting again",
|
||||
"too-many-posts-newbie": "As a new user, you can only post once every %1 second(s) until you have earned %2 reputation - please wait before posting again",
|
||||
"tag-too-short": "Please enter a longer tag. Tags should contain at least %1 character(s)",
|
||||
"tag-too-long": "Please enter a shorter tag. Tags can't be longer than %1 character(s)",
|
||||
"file-too-big": "Maximum allowed file size is %1 kB - please upload a smaller file",
|
||||
"content-too-short": "Por favor digite um post maior. Posts precisam conter ao menos %1 caractere(s).",
|
||||
"content-too-long": "Por favor digite um post mais curto. Posts não podem ser maiores que %1 caractere(s)",
|
||||
"title-too-short": "Por favor digite um título maior. Títulos devem conter no mínimo %1 caractere(s)",
|
||||
"title-too-long": "Por favor digite um título menor. Títulos não podem ser maiores que %1 caractere(s).",
|
||||
"too-many-posts": "Você pode postar uma vez a cada %1 segundo(s) - por favor aguarde antes de postar novamente",
|
||||
"too-many-posts-newbie": "Como novo usuário, você pode postar uma vez a cada %1 segundo(s) até que você tenha recebido reputação de %2 - por favor aguarde antes de postar novamente",
|
||||
"tag-too-short": "Por favor digite uma tag maior. Tags devem conter pelo menos %1 caractere(s)",
|
||||
"tag-too-long": "Por favor digite uma tag menor. Tags não podem conter mais que %1 caractere(s)",
|
||||
"file-too-big": "O tamanho máximo permitido de arquivo é %1 kB - por favor faça upload de um arquivo menor",
|
||||
"cant-vote-self-post": "Você não pode votar no seu próprio post",
|
||||
"already-favourited": "Você já adicionou este post aos favoritos",
|
||||
"already-unfavourited": "Você já removeu este post dos favoritos",
|
||||
@@ -63,12 +63,12 @@
|
||||
"post-already-restored": "Este post já foi restaurado",
|
||||
"topic-already-deleted": "Esté tópico já foi deletado",
|
||||
"topic-already-restored": "Este tópico já foi restaurado",
|
||||
"cant-purge-main-post": "You can't purge the main post, please delete the topic instead",
|
||||
"cant-purge-main-post": "Você não pode remover o post principal, em vez disso, apague o tópico por favor.",
|
||||
"topic-thumbnails-are-disabled": "Thumbnails para tópico estão desativados.",
|
||||
"invalid-file": "Arquivo Inválido",
|
||||
"uploads-are-disabled": "Uploads estão desativados",
|
||||
"signature-too-long": "Sorry, your signature cannot be longer than %1 character(s).",
|
||||
"about-me-too-long": "Sorry, your about me cannot be longer than %1 character(s).",
|
||||
"signature-too-long": "Desculpe, sua assinatura não pode ser maior que %1 caractere(s).",
|
||||
"about-me-too-long": "Desculpe, o sobre não pode ser maior que %1 caractere(s).",
|
||||
"cant-chat-with-yourself": "Você não pode iniciar um chat consigo mesmo!",
|
||||
"chat-restricted": "Este usuário restringiu suas mensagens de chat. Eles devem seguir você antes que você possa conversar com eles",
|
||||
"too-many-messages": "Você enviou muitas mensagens, por favor aguarde um momento.",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"no_topics_found": "Nenhum tópico encontrado!",
|
||||
"no_posts_found": "Nenhum post encontrado!",
|
||||
"post_is_deleted": "Este post está deletado!",
|
||||
"topic_is_deleted": "This topic is deleted!",
|
||||
"topic_is_deleted": "Este tópico foi deletado!",
|
||||
"profile": "Perfil",
|
||||
"posted_by": "Postado por %1",
|
||||
"posted_by_guest": "Postado por Visitante",
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"watched": "Acompanhado",
|
||||
"followers": "Seguidores",
|
||||
"following": "Seguindo",
|
||||
"aboutme": "About me",
|
||||
"aboutme": "Sobre",
|
||||
"signature": "Assinatura",
|
||||
"gravatar": "Gravatar",
|
||||
"birthday": "Aniversário",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"invalid-data": "无效数据",
|
||||
"not-logged-in": "您还没有登陆。",
|
||||
"account-locked": "您的帐号已被临时锁定",
|
||||
"search-requires-login": "Searching requires an account - please login or register.",
|
||||
"search-requires-login": "搜索功能仅限会员使用 - 请先登录或者注册。",
|
||||
"invalid-cid": "无效版块 ID",
|
||||
"invalid-tid": "无效主题 ID",
|
||||
"invalid-pid": "无效帖子 ID",
|
||||
@@ -21,11 +21,11 @@
|
||||
"email-not-confirmed-chat": "您的电子邮箱尚未确认,无法聊天,请点击这里确认您的电子邮箱。",
|
||||
"no-email-to-confirm": "本论坛需要电子邮箱确认,请点击这里输入一个电子邮箱地址",
|
||||
"email-confirm-failed": "我们无法确认您的电子邮箱,请重试",
|
||||
"confirm-email-already-sent": "Confirmation email already sent, please wait %1 minute(s) to send another one.",
|
||||
"confirm-email-already-sent": "确认邮件已发出,如需重新发送请等待 %1 分钟后再试。",
|
||||
"username-too-short": "用户名太短",
|
||||
"username-too-long": "用户名太长",
|
||||
"user-banned": "用户已禁止",
|
||||
"user-too-new": "Sorry, you are required to wait %1 second(s) before making your first post",
|
||||
"user-too-new": "抱歉,您需要等待 %1 秒后,才可以发帖!",
|
||||
"no-category": "版面不存在",
|
||||
"no-topic": "主题不存在",
|
||||
"no-post": "帖子不存在",
|
||||
@@ -36,17 +36,17 @@
|
||||
"no-emailers-configured": "未加载任何电子邮箱插件,无法发送测试邮件",
|
||||
"category-disabled": "版块已禁用",
|
||||
"topic-locked": "主题已锁定",
|
||||
"post-edit-duration-expired": "You are only allowed to edit posts for %1 second(s) after posting",
|
||||
"post-edit-duration-expired": "您必须在发表 %1 秒后才能修改内容",
|
||||
"still-uploading": "请等待上传完成",
|
||||
"content-too-short": "Please enter a longer post. Posts should contain at least %1 character(s).",
|
||||
"content-too-long": "Please enter a shorter post. Posts can't be longer than %1 character(s).",
|
||||
"title-too-short": "Please enter a longer title. Titles should contain at least %1 character(s).",
|
||||
"title-too-long": "Please enter a shorter title. Titles can't be longer than %1 character(s).",
|
||||
"too-many-posts": "You can only post once every %1 second(s) - please wait before posting again",
|
||||
"too-many-posts-newbie": "As a new user, you can only post once every %1 second(s) until you have earned %2 reputation - please wait before posting again",
|
||||
"tag-too-short": "Please enter a longer tag. Tags should contain at least %1 character(s)",
|
||||
"tag-too-long": "Please enter a shorter tag. Tags can't be longer than %1 character(s)",
|
||||
"file-too-big": "Maximum allowed file size is %1 kB - please upload a smaller file",
|
||||
"content-too-short": "请再输入一些内容,帖子至少要有 %1 个字符。",
|
||||
"content-too-long": "请减少帖子字数。字数不能超过 %1 个字符。",
|
||||
"title-too-short": "请再输入一些内容,标题至少要有 %1 个字符。",
|
||||
"title-too-long": "请输入更短的标题。不超过 %1 字。",
|
||||
"too-many-posts": "发帖间隔至少要 %1 秒 - 请稍候再发帖",
|
||||
"too-many-posts-newbie": "作为新用户,您必须每隔 %1 秒才能发帖一次,直到您有 %2 点威望为止 —— 请稍候再发帖",
|
||||
"tag-too-short": "标签长度过短。标签长度不能少于 %1 个字符",
|
||||
"tag-too-long": "标签长度过长,标签长度不能超过 %1 个字符",
|
||||
"file-too-big": "上传文件的大小限制为 %1 kb - 请上传更小的文件",
|
||||
"cant-vote-self-post": "您不能给自己的帖子投票。",
|
||||
"already-favourited": "您已收藏该帖",
|
||||
"already-unfavourited": "您已取消收藏此帖",
|
||||
@@ -57,8 +57,8 @@
|
||||
"group-name-too-short": "用户组名称太短",
|
||||
"group-already-exists": "用户组已存在",
|
||||
"group-name-change-not-allowed": "不允许更改用户组名称",
|
||||
"group-already-member": "您已是此小组成员",
|
||||
"group-needs-owner": "此小组需要至少一名组长",
|
||||
"group-already-member": "您已经是此群组的成员",
|
||||
"group-needs-owner": "此群组需要设立至少一名组长",
|
||||
"post-already-deleted": "此帖子已被删除",
|
||||
"post-already-restored": "此帖已经恢复",
|
||||
"topic-already-deleted": "此主题已被删除",
|
||||
@@ -67,8 +67,8 @@
|
||||
"topic-thumbnails-are-disabled": "主题缩略图已禁用",
|
||||
"invalid-file": "无效文件",
|
||||
"uploads-are-disabled": "上传已禁用",
|
||||
"signature-too-long": "Sorry, your signature cannot be longer than %1 character(s).",
|
||||
"about-me-too-long": "Sorry, your about me cannot be longer than %1 character(s).",
|
||||
"signature-too-long": "抱歉,您的签名不能超过 %1 个字符。",
|
||||
"about-me-too-long": "抱歉,您的‘关于我’不能超过 %1 个字符。",
|
||||
"cant-chat-with-yourself": "您不能和自己聊天!",
|
||||
"chat-restricted": "此用户限制了他的聊天消息。必须他先关注您,您才能和他聊天。",
|
||||
"too-many-messages": "您发送了太多消息,请稍等片刻。",
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"header.tags": "话题",
|
||||
"header.popular": "热门",
|
||||
"header.users": "会员",
|
||||
"header.groups": "小组",
|
||||
"header.groups": "群组",
|
||||
"header.chats": "聊天",
|
||||
"header.notifications": "通知",
|
||||
"header.search": "搜索",
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
"year": "年度热帖榜",
|
||||
"alltime": "总热帖榜",
|
||||
"no_recent_topics": "暂无主题。",
|
||||
"no_popular_topics": "没有热门主题",
|
||||
"there-is-a-new-topic": "有一个新主题",
|
||||
"there-is-a-new-topic-and-a-new-post": "有一个新主题和一个新发表",
|
||||
"there-is-a-new-topic-and-new-posts": "有一个新主题和 %1 新发表",
|
||||
"there-are-new-topics": "有 %1 个新主题",
|
||||
"there-are-new-topics-and-a-new-post": "有 %1个新主题和一个新发表",
|
||||
"there-are-new-topics-and-new-posts": "有 %1个新主题和 %2个新发表",
|
||||
"there-is-a-new-post": "有一个新发表",
|
||||
"there-are-new-posts": "有 %1个新发表",
|
||||
"click-here-to-reload": "点击这里重新加载"
|
||||
"no_popular_topics": "没有热门主题。",
|
||||
"there-is-a-new-topic": "共计 1 个新主题。",
|
||||
"there-is-a-new-topic-and-a-new-post": "共计 1 个新主题和 1 个新回复。",
|
||||
"there-is-a-new-topic-and-new-posts": "共计 1 个新主题和 %1 个新回复。",
|
||||
"there-are-new-topics": "共计 %1 个新主题。",
|
||||
"there-are-new-topics-and-a-new-post": "共计 %1 个新主题和 1 个新回复。",
|
||||
"there-are-new-topics-and-new-posts": "共计 %1 个新主题和 %2 个新回复。",
|
||||
"there-is-a-new-post": "共计 1 个新回复。",
|
||||
"there-are-new-posts": "共计 %1 个新回复。",
|
||||
"click-here-to-reload": "点击这里重新加载。"
|
||||
}
|
||||
@@ -4,8 +4,8 @@
|
||||
"topic_id_placeholder": "输入主题 ID",
|
||||
"no_topics_found": "没有找到主题!",
|
||||
"no_posts_found": "没有找到帖子!",
|
||||
"post_is_deleted": "此帖已被删除!",
|
||||
"topic_is_deleted": "This topic is deleted!",
|
||||
"post_is_deleted": "此回复已被删除!",
|
||||
"topic_is_deleted": "此主题已被删除!",
|
||||
"profile": "资料",
|
||||
"posted_by": "%1 发布",
|
||||
"posted_by_guest": "游客发布",
|
||||
@@ -34,13 +34,13 @@
|
||||
"not_following_topic.message": "您已停止接收此主题的通知。",
|
||||
"login_to_subscribe": "请注册或登录后再订阅此主题。",
|
||||
"markAsUnreadForAll.success": "将全部主题标为未读。",
|
||||
"watch": "监视",
|
||||
"unwatch": "停止监视",
|
||||
"watch": "关注",
|
||||
"unwatch": "取消关注",
|
||||
"watch.title": "此主题有新回复时通知我",
|
||||
"unwatch.title": "停止监视此主题",
|
||||
"unwatch.title": "取消关注此主题",
|
||||
"share_this_post": "分享此帖",
|
||||
"thread_tools.title": "主题工具",
|
||||
"thread_tools.markAsUnreadForAll": "未读标记",
|
||||
"thread_tools.markAsUnreadForAll": "标记为未读",
|
||||
"thread_tools.pin": "置顶主题",
|
||||
"thread_tools.unpin": "取消置顶主题",
|
||||
"thread_tools.lock": "锁定主题",
|
||||
@@ -87,7 +87,7 @@
|
||||
"composer.thumb_url_placeholder": "http://example.com/thumb.png",
|
||||
"composer.thumb_file_label": "或上传文件",
|
||||
"composer.thumb_remove": "清除字段",
|
||||
"composer.drag_and_drop_images": "拖拽图片到这里",
|
||||
"composer.drag_and_drop_images": "拖拽图片到此处",
|
||||
"more_users_and_guests": "%1 名会员和 %2 名游客",
|
||||
"more_users": "%1 名会员",
|
||||
"more_guests": "%1 名游客",
|
||||
@@ -96,5 +96,5 @@
|
||||
"oldest_to_newest": "从旧到新",
|
||||
"newest_to_oldest": "从新到旧",
|
||||
"most_votes": "最多投票",
|
||||
"most_posts": "最多发表"
|
||||
"most_posts": "最多回复"
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
"watched": "已订阅",
|
||||
"followers": "粉丝",
|
||||
"following": "关注",
|
||||
"aboutme": "About me",
|
||||
"aboutme": "关于我",
|
||||
"signature": "签名档",
|
||||
"gravatar": "头像",
|
||||
"birthday": "生日",
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
async = require('async'),
|
||||
nconf = require('nconf'),
|
||||
session = require('express-session'),
|
||||
semver = require('semver'),
|
||||
db, mongoClient;
|
||||
|
||||
module.questions = [
|
||||
@@ -131,6 +132,7 @@
|
||||
}
|
||||
|
||||
function createIndices() {
|
||||
winston.info('[database] Checking database indices.')
|
||||
async.parallel([
|
||||
async.apply(createIndex, 'objects', {_key: 1, score: -1}, {background: true}),
|
||||
async.apply(createIndex, 'objects', {_key: 1, value: -1}, {background: true, unique: true, sparse: true}),
|
||||
@@ -158,6 +160,17 @@
|
||||
});
|
||||
};
|
||||
|
||||
module.checkCompatibility = function(callback) {
|
||||
// For MongoDB, we need to ensure that the mongodb package is >= 2.0.0
|
||||
var mongoPkg = require.main.require('./node_modules/mongodb/package.json'),
|
||||
err = semver.lt(mongoPkg.version, '2.0.0') ? new Error('The `mongodb` package is out-of-date, please run `./nodebb setup` again.') : null;
|
||||
|
||||
if (err) {
|
||||
err.stacktrace = false;
|
||||
}
|
||||
callback(err);
|
||||
};
|
||||
|
||||
module.info = function(db, callback) {
|
||||
db.stats({scale:1024}, function(err, stats) {
|
||||
if(err) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
var winston = require('winston'),
|
||||
nconf = require('nconf'),
|
||||
path = require('path'),
|
||||
semver = require('semver'),
|
||||
session = require('express-session'),
|
||||
utils = require('./../../public/src/utils.js'),
|
||||
redis,
|
||||
@@ -111,6 +112,17 @@
|
||||
return cxn;
|
||||
};
|
||||
|
||||
module.checkCompatibility = function(callback) {
|
||||
// Redis requires v2.8.9
|
||||
module.info(module.client, function(err, info) {
|
||||
var err = semver.lt(info.redis_version, '2.8.9') ? new Error('Your Redis version is not new enough to support NodeBB, please upgrade Redis to v2.8.9 or higher.') : null;
|
||||
if (err) {
|
||||
err.stacktrace = false;
|
||||
}
|
||||
callback(err);
|
||||
});
|
||||
};
|
||||
|
||||
module.close = function() {
|
||||
redisClient.quit();
|
||||
};
|
||||
|
||||
@@ -61,6 +61,9 @@ module.exports = function(Topics) {
|
||||
return callback(err);
|
||||
}
|
||||
var teasers = topics.map(function(topic, index) {
|
||||
if (!topic) {
|
||||
return null;
|
||||
}
|
||||
if (tidToPost[topic.tid]) {
|
||||
tidToPost[topic.tid].index = counts[index];
|
||||
if (tidToPost[topic.tid].content) {
|
||||
@@ -109,4 +112,4 @@ module.exports = function(Topics) {
|
||||
Topics.setTopicField(tid, 'teaserPid', pid, callback);
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,7 +17,7 @@ var db = require('./database'),
|
||||
|
||||
Upgrade = {},
|
||||
|
||||
minSchemaDate = Date.UTC(2015, 1, 8), // This value gets updated every new MINOR version
|
||||
minSchemaDate = Date.UTC(2015, 0, 30), // This value gets updated every new MINOR version
|
||||
schemaDate, thisSchemaDate,
|
||||
|
||||
// IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema
|
||||
|
||||
Reference in New Issue
Block a user