Enable specific version to be passed to ver()

This commit is contained in:
str4d
2013-06-03 23:46:35 +00:00
parent 436bf3801b
commit 983628e09e
2 changed files with 6 additions and 4 deletions

View File

@ -23,12 +23,12 @@ 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='https', file='i2pinstall_0.9.5-win1_windows.exe', mirror=1) }}">i2pinstall_0.9.5-win1_windows.exe</a> (Google Code)
(<a href="{{ get_url('downloads_select', file='i2pinstall_0.9.5-win1_windows.exe') }}">{{ _('select alternate link') }}</a>)
<a href="{{ url_for('downloads_redirect', protocol='https', file=ver('i2pinstall_%s_windows.exe', '0.9.5-win1'), mirror=1) }}">i2pinstall_0.9.5-win1_windows.exe</a> (Google Code)
(<a href="{{ get_url('downloads_select', file=ver('i2pinstall_%s_windows.exe', '0.9.5-win1')) }}">{{ _('select alternate link') }}</a>)
<div class="sig">
(SHA256
<code>d64101793764bf77ac3dfc2352677b3d06eef3b6ecb4fa0cf2cf43fc237302f8</code>
<a href="{{ url_for('downloads_redirect', protocol='https', file='i2pinstall_0.9.5-win1_windows.exe.sig', mirror=1) }}">sig</a>)
<a href="{{ url_for('downloads_redirect', protocol='https', file=ver('i2pinstall_%s_windows.exe.sig', '0.9.5-win1'), mirror=1) }}">sig</a>)
</div>
</div>
<div class="details">

View File

@ -87,8 +87,10 @@ def utility_processor():
logo = 'images/i2plogo.png'
return logo
def get_current_version(string=None):
def get_current_version(string=None, ver=None):
if string:
if ver:
return string % ver
return string % CURRENT_I2P_VERSION
return CURRENT_I2P_VERSION