From 72f7f5a3fd0dc6eda1608eb64ab2f838d38bad82 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 23 Jul 2014 07:15:29 +0000 Subject: [PATCH] * Admin/Setup: restore of 14.1 backup was not working (backup file itself is correct) caused by typo in json_decode of schema --- phpgwapi/inc/class.db_backup.inc.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/phpgwapi/inc/class.db_backup.inc.php b/phpgwapi/inc/class.db_backup.inc.php index b118ea28a3..58a61d064a 100644 --- a/phpgwapi/inc/class.db_backup.inc.php +++ b/phpgwapi/inc/class.db_backup.inc.php @@ -457,15 +457,7 @@ class db_backup if (substr($line,0,8) == 'schema: ') { // create the tables in the backup set - $schema = trim(substr($line,8)); - if ($schema[0] == 'a' && $schema[1] == ':') - { - $this->schemas = php_safe_unserialize($schema); - } - else - { - $this->schema = json_decode($schema, true); - } + $this->schemas = json_php_unserialize(trim(substr($line,8))); foreach($this->schemas as $table_name => $schema) { // if column is longtext in current schema, convert text to longtext, in case user already updated column