Mercurial > hg > cmmr2012-drupal-site
comparison core/lib/Drupal/Core/Command/DbDumpCommand.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
423 if (!empty($data)) { | 423 if (!empty($data)) { |
424 $insert = ''; | 424 $insert = ''; |
425 foreach ($data as $record) { | 425 foreach ($data as $record) { |
426 $insert .= "->values(" . Variable::export($record) . ")\n"; | 426 $insert .= "->values(" . Variable::export($record) . ")\n"; |
427 } | 427 } |
428 $output .= "\$connection->insert('" . $table . "')\n" | 428 $fields = Variable::export(array_keys($schema['fields'])); |
429 . "->fields(" . Variable::export(array_keys($schema['fields'])) . ")\n" | 429 $output .= <<<EOT |
430 . $insert | 430 \$connection->insert('$table') |
431 . "->execute();\n\n"; | 431 ->fields($fields) |
432 {$insert}->execute(); | |
433 | |
434 EOT; | |
432 } | 435 } |
433 return $output; | 436 return $output; |
434 } | 437 } |
435 | 438 |
436 } | 439 } |