From: phasefx Date: Fri, 6 Nov 2009 18:35:15 +0000 (+0000) Subject: fix logic error with the patron log. The array should work more like a Set. We... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c296c7fdf354e6eee4732fb595beea76c937622b;p=contrib%2FConifer.git fix logic error with the patron log. The array should work more like a Set. We only want to see the last X unique patrons who had activity logged git-svn-id: svn://svn.open-ils.org/ILS/trunk@14808 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/util/error.js b/Open-ILS/xul/staff_client/chrome/content/util/error.js index d484f9ba42..93b2e931c1 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/error.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/error.js @@ -606,7 +606,11 @@ util.error.prototype = { to_top: true }; if (data.patron_log.length > 0) { - if ( data.patron_log[ data.patron_log.length -1 ].row.my.au_id == row_data.au_id ) data.patron_log.pop(); + var temp = []; + for (var i = 0; i < data.patron_log.length; i++) { + if (data.patron_log[ i ].row.my.au_id != row_data.au_id) temp.push( data.patron_log[i] ); + } + data.patron_log = temp; } data.patron_log.push( ds ); if (data.patron_log.length > max_entries) data.patron_log.shift();