[BUGFIX] Correct link building

Resolves: #3
This commit is contained in:
Markus Klein 2020-10-08 16:52:43 +02:00
parent ca56b9224c
commit 6d27e3d0f8

View file

@ -99,7 +99,7 @@ class Link
throw new \InvalidArgumentException('No ID provided.', 1599723825); throw new \InvalidArgumentException('No ID provided.', 1599723825);
} }
$link = $this->settings->getMySkillDisplayUrl() . '/skillup/' . $type . '/' . $id . '/0/' . ($campaignId ?: ''); $link = $this->settings->getMySkillDisplayUrl() . '/skillup/' . $type . '/' . $id . '/0/';
switch ($vtype) { switch ($vtype) {
case VERIFICATION_EDUCATIONAL: case VERIFICATION_EDUCATIONAL:
$link .= '2'; $link .= '2';
@ -114,6 +114,9 @@ class Link
$link .= '3'; $link .= '3';
break; break;
} }
if ($campaignId) {
$link .= '/' . $campaignId;
}
return $link; return $link;
} }