diff options
Diffstat (limited to 'src/sections/3_modify_data.php')
| -rw-r--r-- | src/sections/3_modify_data.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/sections/3_modify_data.php b/src/sections/3_modify_data.php index 00fe220..607638b 100644 --- a/src/sections/3_modify_data.php +++ b/src/sections/3_modify_data.php | |||
| @@ -5,9 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | require('3-1_windows.php'); | 6 | require('3-1_windows.php'); |
| 7 | 7 | ||
| 8 | use Doctrine\ORM\EntityManager; | 8 | function modifyData(?Client $Client = null): array |
| 9 | |||
| 10 | function modifyData($Client): array | ||
| 11 | { | 9 | { |
| 12 | // -- partie 1: rechercher un client -- | 10 | // -- partie 1: rechercher un client -- |
| 13 | 11 | ||
| @@ -19,12 +17,11 @@ function modifyData($Client): array | |||
| 19 | $TypeDeClient = new ZenityList(ZenitySetup::$type_client['text'], ZenitySetup::$type_client['entrees']); | 17 | $TypeDeClient = new ZenityList(ZenitySetup::$type_client['text'], ZenitySetup::$type_client['entrees']); |
| 20 | $Calendrier = new ZenityCalendar(ZenitySetup::$calendar['section3']); | 18 | $Calendrier = new ZenityCalendar(ZenitySetup::$calendar['section3']); |
| 21 | 19 | ||
| 22 | if($Client == null || get_class($Client) !== 'Client') // étape sautable | 20 | if(!$Client) |
| 23 | { | 21 | { |
| 24 | $Client = Client::getObject($RechercheClient, $ResultatsRechercheClient); // = 0 ou type "Client" | 22 | $Client = Client::find($RechercheClient, $ResultatsRechercheClient); |
| 25 | //$ResultatsRechercheClient->cleanCommand(); // inutile parce qu'on ne boucle pas dans cette fonction | 23 | //$ResultatsRechercheClient->cleanCommand(); // inutile parce qu'on ne boucle pas dans cette fonction |
| 26 | //if(!is_object($Client) || !get_class($Client) == 'Client') | 24 | if(!$Client) |
| 27 | if($Client === 0) | ||
| 28 | { | 25 | { |
| 29 | echo "debug: annulation sélection client\n"; | 26 | echo "debug: annulation sélection client\n"; |
| 30 | return [0, null]; // menu principal | 27 | return [0, null]; // menu principal |
