| Conditions | 6 |
| Paths | 4 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | public function handle() |
||
| 24 | { |
||
| 25 | // si déjà lire/présentation en ligne => on touche à rien |
||
| 26 | if ($this->origin->hasParamValue('lire en ligne') |
||
| 27 | || $this->origin->hasParamValue('présentation en ligne') |
||
| 28 | ) { |
||
| 29 | return; |
||
| 30 | } |
||
| 31 | |||
| 32 | // completion basique |
||
| 33 | $booklire = $this->book->getParam('lire en ligne'); |
||
| 34 | if ($booklire) { |
||
| 35 | $this->origin->setParam('lire en ligne', $booklire); |
||
| 36 | $this->changeOptiStatus(); |
||
| 37 | |||
| 38 | return; |
||
| 39 | } |
||
| 40 | |||
| 41 | $presentation = $this->book->getParam('présentation en ligne') ?? false; |
||
| 42 | // Ajout du partial Google => mis en lire en ligne |
||
| 43 | // plutôt que 'présentation en ligne' selon sondage |
||
| 44 | if (!empty($presentation) && GoogleLivresTemplate::isGoogleBookValue($presentation)) { |
||
| 45 | $this->origin->setParam('lire en ligne', $presentation); |
||
| 46 | $this->changeOptiStatus(); |
||
| 47 | } |
||
| 56 | } |