* Admin/Setup: restore of 14.1 backup was not working (backup file itself is correct)

caused by typo in json_decode of schema
This commit is contained in:
Ralf Becker 2014-07-23 07:15:29 +00:00
parent 650d271fc0
commit 72f7f5a3fd

View File

@ -457,15 +457,7 @@ class db_backup
if (substr($line,0,8) == 'schema: ') if (substr($line,0,8) == 'schema: ')
{ {
// create the tables in the backup set // create the tables in the backup set
$schema = trim(substr($line,8)); $this->schemas = json_php_unserialize(trim(substr($line,8)));
if ($schema[0] == 'a' && $schema[1] == ':')
{
$this->schemas = php_safe_unserialize($schema);
}
else
{
$this->schema = json_decode($schema, true);
}
foreach($this->schemas as $table_name => $schema) foreach($this->schemas as $table_name => $schema)
{ {
// if column is longtext in current schema, convert text to longtext, in case user already updated column // if column is longtext in current schema, convert text to longtext, in case user already updated column