Fix HTML catalog when more than 2 prefered format are available

This commit is contained in:
Sébastien Lucas 2012-07-01 14:59:18 +02:00
parent 7b382b2420
commit f5b8918ee0

View file

@ -159,9 +159,12 @@
</div>
<div class="download">
<?php
$i = 0;
foreach ($config['cops_prefered_format'] as $format)
{
if ($i == 2) { break; }
if ($data = $entry->book->getDataFormat ($format)) {
$i++;
?>
<div class="button buttonEffect"><a href="<?php echo $data->getHtmlLink () ?>"><?php echo $format ?></a></div>
<?php