From 89fd9e35cf61fc4ac3683a994051ff975dcc63ef Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 15 Jan 2015 16:34:27 +0000 Subject: [PATCH] * Backup: fixed broken backup of tables without an auto index --- phpgwapi/inc/class.db_backup.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.db_backup.inc.php b/phpgwapi/inc/class.db_backup.inc.php index 51a66245b3..1747a8acf6 100644 --- a/phpgwapi/inc/class.db_backup.inc.php +++ b/phpgwapi/inc/class.db_backup.inc.php @@ -921,7 +921,7 @@ class db_backup // limit by maximum primary key already received empty($pk) || !$max ? false : $pk.' > '.$this->db->quote($max, $schema['fd'][$pk]['type']), __LINE__, __FILE__, - empty($pk) ? $total : 0, // if no primary limit by number of received rows + empty($pk) ? false : 0, // if no primary key, query all rows empty($pk) ? '' : 'ORDER BY '.$pk.' ASC', // order by primary key false, self::ROW_CHUNK) as $row) { @@ -934,7 +934,7 @@ class db_backup ++$num_rows; } } - while(!($total % self::ROW_CHUNK) && $num_rows); + while(!empty($pk) && !($total % self::ROW_CHUNK) && $num_rows); } if(!$zippresent) // save without files {