2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00

Fix problems from importing 0.4.0 file

fixes #2244
- added mysql ‚true’/‚false‘ values as ‚0‘/‚1‘
- removed all core settings from import
This commit is contained in:
Sebastian Gierlinger 2014-02-25 20:15:32 +01:00
parent aa15b464c8
commit ae06239834
2 changed files with 4 additions and 4 deletions

View file

@ -112,13 +112,13 @@ function importUsers(ops, tableData, transaction) {
function importSettings(ops, tableData, transaction) {
// for settings we need to update individual settings, and insert any missing ones
// settings we MUST NOT update are the databaseVersion, dbHash, and activeTheme
// settings we MUST NOT update are 'core' and 'theme' settings
// as all of these will cause side effects which don't make sense for an import
var blackList = ['core', 'theme'];
var blackList = ['databaseVersion', 'dbHash', 'activeTheme'];
tableData = stripProperties(['id'], tableData);
tableData = _.filter(tableData, function (data) {
return blackList.indexOf(data.key) === -1;
return blackList.indexOf(data.type) === -1;
});
ops.push(models.Settings.edit(tableData, transaction)

View file

@ -192,7 +192,7 @@ function showUpdateNotification() {
// Version 0.4 used boolean to indicate the need for an update. This special case is
// translated to the version string.
// TODO: remove in future version.
if (display.value === 'false' || display.value === 'true') {
if (display.value === 'false' || display.value === 'true' || display.value === '1' || display.value === '0') {
display.value = '0.4.0';
}