Skip to content

Commit

Permalink
Check if origin is set
Browse files Browse the repository at this point in the history
  • Loading branch information
LucWollants committed Apr 17, 2024
1 parent 3652637 commit d03b182
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Widget/Twig/TwigPreprocessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,9 @@ public function preprocessEventDetail(Event $event, string $langcode, array $set
// Share links
$shareUrl = Url::factory($this->socialHost . '/event/' . $event->getCdbid());
$shareQuery = $shareUrl->getQuery();
$shareQuery['origin'] = $_GET['origin'];
if (isset($_GET['origin'])) {
$shareQuery['origin'] = $_GET['origin'];
}

$variables['share_links'] = [
'facebook' => 'https://www.facebook.com/sharer/sharer.php?u=' . urlencode($shareUrl->__toString()),
Expand Down

0 comments on commit d03b182

Please sign in to comment.