| @@ -57,8 +57,11 @@ | ||
| 57 | 57 | |
| 58 | 58 | if (!empty($data['valid_until'])) { |
| 59 | 59 | // convert the provided date-time string into UTC |
| 60 | 60 | $data['valid_until'] = JFactory::getDate($data['valid_until'], JFactory::getApplication()->get('offset'))->toSql(); |
| 61 | + } else { | |
| 62 | + // force the value to be null | |
| 63 | + $data['valid_until'] = null; | |
| 61 | 64 | } |
| 62 | 65 | |
| 63 | 66 | if (!empty($data['country_3_code']) && strlen($data['country_3_code']) !== 3) { |
| 64 | 67 | // attempt to convert a country iso2 code into the corresponding iso3 char code |
| @@ -391,13 +394,15 @@ | ||
| 391 | 394 | |
| 392 | 395 | // access booking registry for the first related booking (if any) |
| 393 | 396 | $bookingRegistry = $bookingIds ? VBOBookingRegistry::getInstance(['id' => $bookingIds[0] ?? 0]) : null; |
| 394 | 397 | |
| 398 | + // get booking language | |
| 399 | + $lang = $bookingRegistry->getProperty('lang'); | |
| 400 | + | |
| 395 | 401 | // route quote URI |
| 396 | 402 | $quoteUri = VikBooking::externalroute( |
| 397 | - "index.php?option=com_vikbooking&view=quote&ref={$quote->uuid}", | |
| 398 | - false, | |
| 399 | - (VikBooking::findProperItemIdType(['quote'], $bookingRegistry->getProperty('lang') ?: null) ?: null) | |
| 403 | + "index.php?option=com_vikbooking&view=quote&ref={$quote->uuid}" . ($lang ? "&lang={$lang}" : ''), | |
| 404 | + false | |
| 400 | 405 | ); |
| 401 | 406 | |
| 402 | 407 | // build the list of known tag parameters |
| 403 | 408 | $tagParameters = [ |