Fixes #206, notes/attachment count incorrect after deletion

The notes/attachment count wasn't going down on an attachment deletion because it's not actually a notes/attachment count at all--it's a notes count, and new attachments were incorrectly incrementing it.

This technically either fixes or invalidates #202 ("attachments categorized as notes"), depending on how you look at it, but I'll change that to reflect the desired goal of having a combined notes/attachments count.

Refs #202
This commit is contained in:
Dan Stillman 2006-08-25 08:01:55 +00:00
parent ebb9122e0a
commit 9df93a8e27

View file

@ -2280,7 +2280,7 @@ Scholar.Attachments = new function(){
Scholar.DB.commitTransaction(); Scholar.DB.commitTransaction();
if (sourceItemID){ if (sourceItemID){
sourceItem.incrementNoteCount(); sourceItem.incrementAttachmentCount();
Scholar.Notifier.trigger('modify', 'item', sourceItemID); Scholar.Notifier.trigger('modify', 'item', sourceItemID);
} }