summaryrefslogtreecommitdiff
path: root/templates/packages
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-18 11:34:22 -0500
committerDan McGee <dan@archlinux.org>2010-09-20 10:33:20 -0500
commit7409e1155f8773b2515885886c0165573e2ff4d5 (patch)
tree6e389f382e347e9022334d3848eb17d087650c5d /templates/packages
parent445bd7c80b896594b8fdeade425390dca1e8910d (diff)
Fix package differences pkgrel comparison
Using the right index in the array might help; we were comparing pkgver again and not pkgrel at all. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/packages')
-rw-r--r--templates/packages/differences.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/templates/packages/differences.html b/templates/packages/differences.html
index 16bde560..2c1460ea 100644
--- a/templates/packages/differences.html
+++ b/templates/packages/differences.html
@@ -75,14 +75,15 @@ filter_packages = function() {
rows = rows.filter(function(index) {
// all this just to get the split version out of the table cell
var pat = /(.*)-(.+)/;
- var ver_a = $('td:eq(2) a', this).text().match(pat);
- var ver_b = $('td:eq(3) a', this).text().match(pat);
+ var ver_a = $('td:eq(2) span', this).text().match(pat);
+ var ver_b = $('td:eq(3) span', this).text().match(pat);
// did we match at all?
if(!ver_a || !ver_b) return true;
// first check pkgver
if(ver_a[1] !== ver_b[1]) return true;
// pkgver matched, so see if rounded pkgrel matches
- if(Math.floor(parseFloat(ver_a[1])) == Math.floor(parseFloat(ver_b[1]))) return false;
+ if(Math.floor(parseFloat(ver_a[2])) ==
+ Math.floor(parseFloat(ver_b[2]))) return false;
// pkgrel didn't match, so keep the row
return true;
});