Bugfix: index mirrors from 1 (mirror=0 is interpreted as False)

This commit is contained in:
str4d
2013-04-21 23:35:09 +00:00
parent 2abb15beb7
commit a3d0129dcd
3 changed files with 7 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ or type <tt>java -version</tt> at your command prompt.
<div class="package">
<h1>Windows</h1>
<div class="file">
<a href="{{ url_for('downloads_redirect', protocol='http', file=ver('i2pinstall_%s_windows.exe'), mirror=0) }}">i2pinstall_{{ ver() }}_windows.exe</a> (Google Code)
<a href="{{ url_for('downloads_redirect', protocol='http', file=ver('i2pinstall_%s_windows.exe'), mirror=1) }}">i2pinstall_{{ ver() }}_windows.exe</a> (Google Code)
(<a href="{{ get_url('downloads_select', file=ver('i2pinstall_%s_windows.exe')) }}">{{ _('select alternate link') }}</a>)
<div class="sig">
(SHA256 <code>
@@ -41,7 +41,7 @@ d904878f1feb758afb75cae31af52e3504b43b5ff531c060d902145a19eec56e
<div class="package">
<h1>Mac OS X</h1>
<div class="file">
<a href="{{ url_for('downloads_redirect', protocol='http', file=ver('i2pinstall_%s.jar'), mirror=0) }}">i2pinstall_{{ ver() }}.jar</a> (Google Code)
<a href="{{ url_for('downloads_redirect', protocol='http', file=ver('i2pinstall_%s.jar'), mirror=1) }}">i2pinstall_{{ ver() }}.jar</a> (Google Code)
(<a href="{{ get_url('downloads_select', file=ver('i2pinstall_%s.jar')) }}">{{ _('select alternate link') }}</a>)
<div class="sig">
(SHA256 <code>
@@ -69,7 +69,7 @@ af251596e034b751dc17b73bd35254b94f92d4a3121a6e96479c45c4d846ab30
<div class="package">
<h1>GNU/Linux / BSD / Solaris</h1>
<div class="file">
<a href="{{ url_for('downloads_redirect', protocol='http', file=ver('i2pinstall_%s.jar'), mirror=0) }}">i2pinstall_{{ ver() }}.jar</a> (Google Code)
<a href="{{ url_for('downloads_redirect', protocol='http', file=ver('i2pinstall_%s.jar'), mirror=1) }}">i2pinstall_{{ ver() }}.jar</a> (Google Code)
(<a href="{{ get_url('downloads_select', file=ver('i2pinstall_%s.jar')) }}">{{ _('select alternate link') }}</a>)
<div class="sig">
(SHA256 <code>
@@ -131,7 +131,7 @@ af251596e034b751dc17b73bd35254b94f92d4a3121a6e96479c45c4d846ab30
<div class="package">
<h1>{{ _('Source package') }}</h1>
<div class="file">
<a href="{{ url_for('downloads_redirect', protocol='http', file=ver('i2psource_%s.tar.bz2'), mirror=0) }}">i2psource_{{ ver() }}.tar.bz2</a> (Google Code)
<a href="{{ url_for('downloads_redirect', protocol='http', file=ver('i2psource_%s.tar.bz2'), mirror=1) }}">i2psource_{{ ver() }}.tar.bz2</a> (Google Code)
(<a href="{{ get_url('downloads_select', file=ver('i2psource_%s.tar.bz2')) }}">{{ _('select alternate link') }}</a>)
<div class="sig">
(SHA256 <code>
@@ -257,7 +257,7 @@ receive the release.
<div class="package">
<h1>{{ _('Manual updates') }}</h1>
<div class="file">
<a href="{{ url_for('downloads_redirect', protocol='http', file=ver('i2pupdate_%s.zip'), mirror=0) }}">i2pupdate_{{ ver() }}.zip</a> (Google Code)
<a href="{{ url_for('downloads_redirect', protocol='http', file=ver('i2pupdate_%s.zip'), mirror=1) }}">i2pupdate_{{ ver() }}.zip</a> (Google Code)
(<a href="{{ get_url('downloads_select', file=ver('i2pupdate_%s.zip')) }}">{{ _('select alternate link') }}</a>)
<div class="sig">
(SHA256 <code>

View File

@@ -9,7 +9,7 @@
<ul>
<li><a href="{{ url_for('downloads_redirect', protocol=protocol.name, file=file) }}">{{ _('Any mirror') }}</a></li>
{% for mirror in protocol.mirrors -%}
<li><img src="{{ url_for('static', filename='images/flags/'+mirror.country+'.png') }}" />&nbsp;{% if mirror.org_url %}<a href="{{ mirror.org_url }}">{% endif %}{{ mirror.org }}{% if mirror.org_url %}</a>{% endif %} <a href="{{ url_for('downloads_redirect', protocol=protocol.name, file=file, mirror=loop.index-1) }}">[{{ _('Download') }}]</a></li>
<li><img src="{{ url_for('static', filename='images/flags/'+mirror.country+'.png') }}" />&nbsp;{% if mirror.org_url %}<a href="{{ mirror.org_url }}">{% endif %}{{ mirror.org }}{% if mirror.org_url %}</a>{% endif %} <a href="{{ url_for('downloads_redirect', protocol=protocol.name, file=file, mirror=loop.index) }}">[{{ _('Download') }}]</a></li>
{%- endfor %}
</ul>
</div>