mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 16:46:24 +02:00
fixed a problem with cerulean which duped motd and forced you to toggle themes to deactivate
This commit is contained in:
@@ -535,6 +535,38 @@ Upgrade.upgrade = function(callback) {
|
||||
next();
|
||||
}
|
||||
},
|
||||
function(next) {
|
||||
thisSchemaDate = Date.UTC(2014, 4, 1);
|
||||
|
||||
if (schemaDate < thisSchemaDate) {
|
||||
db.getObjectField('widgets:home.tpl', 'sidebar', function(err, widgetData) {
|
||||
if (err) {
|
||||
winston.error('[2014/4/1] Error moving home sidebar widgets into draft zone');
|
||||
return next(err);
|
||||
}
|
||||
|
||||
db.setObjectField('widgets:global', 'drafts', widgetData, function(err) {
|
||||
if (err) {
|
||||
winston.error('[2014/4/1] Error moving home sidebar widgets into draft zone');
|
||||
return next(err);
|
||||
}
|
||||
|
||||
db.deleteObjectField('widgets:home.tpl', 'sidebar', function(err) {
|
||||
if (err) {
|
||||
winston.error('[2014/4/1] Error moving home sidebar widgets into draft zone');
|
||||
next(err);
|
||||
} else {
|
||||
winston.info('[2014/4/1] Moved home sidebar widgets into draft zone');
|
||||
Upgrade.update(thisSchemaDate, next);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
winston.info('[2014/4/1] Moved home sidebar widgets into draft zone - skipped');
|
||||
next();
|
||||
}
|
||||
},
|
||||
function(next) {
|
||||
thisSchemaDate = Date.UTC(2014, 4, 2);
|
||||
|
||||
@@ -563,10 +595,10 @@ Upgrade.upgrade = function(callback) {
|
||||
});
|
||||
});
|
||||
} else {
|
||||
winston.info('[2014/4/1] Moved deprecated vanilla footer widgets into draft zone - skipped');
|
||||
winston.info('[2014/4/2] Moved deprecated vanilla footer widgets into draft zone - skipped');
|
||||
next();
|
||||
}
|
||||
},
|
||||
}
|
||||
// Add new schema updates here
|
||||
// IMPORTANT: REMEMBER TO UPDATE VALUE OF latestSchema IN LINE 22!!!
|
||||
], function(err) {
|
||||
|
||||
Reference in New Issue
Block a user