Patch #25240 » 0003-change-MD5-table-header-to-Checksum.patch
| app/models/attachment.rb | ||
|---|---|---|
|
self.class.extension_in?(File.extname(filename), extensions)
|
||
|
end
|
||
|
# returns either MD5 or SHA256 depending on the way self.digest was computed
|
||
|
def digest_type
|
||
|
digest.size < 64 ? "MD5" : "SHA256" if digest.present?
|
||
|
end
|
||
|
private
|
||
|
# Physically deletes the file from the file system
|
||
| app/views/files/index.html.erb | ||
|---|---|---|
|
<%= sort_header_tag('created_on', :caption => l(:label_date), :default_order => 'desc') %>
|
||
|
<%= sort_header_tag('size', :caption => l(:field_filesize), :default_order => 'desc') %>
|
||
|
<%= sort_header_tag('downloads', :caption => l(:label_downloads_abbr), :default_order => 'desc') %>
|
||
|
<th>MD5</th>
|
||
|
<th><%= l(:label_checksum) %></th>
|
||
|
<th></th>
|
||
|
</tr></thead>
|
||
|
<tbody>
|
||
| ... | ... | |
|
<td class="created_on"><%= format_time(file.created_on) %></td>
|
||
|
<td class="filesize"><%= number_to_human_size(file.filesize) %></td>
|
||
|
<td class="downloads"><%= file.downloads %></td>
|
||
|
<td class="digest"><%= file.digest %></td>
|
||
|
<td class="digest"><%= file.digest_type %>: <%= file.digest %></td>
|
||
|
<td class="buttons">
|
||
|
<%= link_to(image_tag('delete.png'), attachment_path(file),
|
||
|
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
|
||
| config/locales/en.yml | ||
|---|---|---|
|
label_font_default: Default font
|
||
|
label_font_monospace: Monospaced font
|
||
|
label_font_proportional: Proportional font
|
||
|
label_checksum: Checksum
|
||
|
button_login: Login
|
||
|
button_submit: Submit
|
||
- « Previous
- 1
- …
- 4
- 5
- 6
- Next »