From 7409e1155f8773b2515885886c0165573e2ff4d5 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 18 Sep 2010 11:34:22 -0500 Subject: 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 --- templates/packages/differences.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'templates/packages') diff --git a/templates/packages/differences.html b/templates/packages/differences.html index 16bde56..2c1460e 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; }); -- cgit v1.2.3-24-g4f1b