fix logic error with the patron log. The array should work more like a Set. We...
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 6 Nov 2009 18:35:15 +0000 (18:35 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 6 Nov 2009 18:35:15 +0000 (18:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14808 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/util/error.js

index d484f9b..93b2e93 100644 (file)
@@ -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();