Commit e0a1e651 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

1.0.5 (03/12/2024)

------------------

- [Fix] Correction regressions suite sortie 1.0.4...
parent 14f6044b
Loading
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -487,7 +487,7 @@ class Table



    public function merge(array $data, $key, array $options = []): array
    public function merge(array $data, array|string|null $key, array $options = []): array
    {
        $ddl = $this->getDdl();
        $bdd = $this->getBdd();
@@ -614,9 +614,9 @@ class Table
                    case 'delete':
                        $callbackCount++;
                        $callbackProgress++;
                        $key = [$this->makeKeyArray($o, $key)];
                        $this->delete($key);
                        if ($doCallback) call_user_func($callback, 'delete', $callbackProgress, $callbackCount, $o, $key);
                        $k = $this->makeKeyArray($o, $key);
                        $this->delete($k);
                        if ($doCallback) call_user_func($callback, 'delete', $callbackProgress, $callbackCount, $o, $k);
                        break;
                    case 'soft-delete':
                        $toUpdate = [
@@ -625,9 +625,9 @@ class Table
                        ];
                        $callbackCount++;
                        $callbackProgress++;
                        $key = $this->makeKeyArray($o, $key);
                        $this->update($toUpdate, $key, ['ddl' => $ddl]);
                        if ($doCallback) call_user_func($callback, 'soft-delete', $callbackProgress, $callbackCount, $o, $key);
                        $k = $this->makeKeyArray($o, $key);
                        $this->update($toUpdate, $k, ['ddl' => $ddl]);
                        if ($doCallback) call_user_func($callback, 'soft-delete', $callbackProgress, $callbackCount, $o, $k);
                        break;
                    case 'undelete':
                        $toUpdate = [
@@ -635,9 +635,9 @@ class Table
                            $options['histo-destructeur-id-column'] => null,
                        ];
                        $callbackProgress++;
                        $key = $this->makeKeyArray($o, $key);
                        $this->update($toUpdate, $key, ['ddl' => $ddl]);
                        if ($doCallback) call_user_func($callback, 'undelete', $callbackProgress, $callbackCount, $o, $key);
                        $k = $this->makeKeyArray($o, $key);
                        $this->update($toUpdate, $k, ['ddl' => $ddl]);
                        if ($doCallback) call_user_func($callback, 'undelete', $callbackProgress, $callbackCount, $o, $k);
                        break;
                    case 'update':
                        $toUpdate = $diff;
@@ -646,9 +646,9 @@ class Table
                            $toUpdate[$options['histo-modificateur-id-column']] = $options['histo-user-id'];
                        }
                        $callbackProgress++;
                        $key = $this->makeKeyArray($o, $key);
                        $k = $this->makeKeyArray($o, $key);
                        $this->update($toUpdate, $key, ['ddl' => $ddl]);
                        if ($doCallback) call_user_func($callback, 'update', $callbackProgress, $callbackCount, $toUpdate, $key);
                        if ($doCallback) call_user_func($callback, 'update', $callbackProgress, $callbackCount, $toUpdate, $k);

                        break;
                }