Skip to content

Commit d324dd8

Browse files
committed
Make sure we always have an algorithm, and there's even a nice method for that!
1 parent 48cc4e8 commit d324dd8

File tree

1 file changed

+1
-1
lines changed
  • site/app/Pulse/Presenters/templates/PasswordsStorages

1 file changed

+1
-1
lines changed

site/app/Pulse/Presenters/templates/PasswordsStorages/default.latte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{define #metas}
1313
{if count($data->getSites()) === 1}
1414
{capture $currentRating}{=current($data->getSites())->getRating()|lower}{/capture}
15-
{var MichalSpacekCz\Pulse\Passwords\Algorithm $currentAlgo = current(current(current($data->getStorages())->getSites())->getAlgorithms())}
15+
{var MichalSpacekCz\Pulse\Passwords\Algorithm $currentAlgo = current($data->getSites())->getLatestAlgorithm()}
1616
<meta property="og:image" content="{="pulse/rating-$currentRating.png"|staticImageUrl}">
1717
<meta property="og:description" content="{=$currentAlgo->getId()}{if $currentAlgo->getFrom() || $currentAlgo->getLatestDisclosure()->getPublished()} ({if $currentAlgo->getFrom() && $currentAlgo->isFromConfirmed()}since {$currentAlgo->getFrom()|date:'F Y'}{/if}{if $currentAlgo->getFrom() && $currentAlgo->isFromConfirmed() && $currentAlgo->getLatestDisclosure()->getPublished()}, {/if}{if $currentAlgo->getLatestDisclosure()->getPublished()}disclosed {$currentAlgo->getLatestDisclosure()->getPublished()|date:'F Y'}{/if}){/if}">
1818
{else}

0 commit comments

Comments
 (0)