From e22bdaab33226db5b2f5ba6bd2292fa16a98e792 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 28 Jun 2006 18:28:09 +0000 Subject: [PATCH] Disallow setting note source to another note (presumably that's what See Also is for) --- chrome/chromeFiles/content/scholar/xpcom/data_access.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chrome/chromeFiles/content/scholar/xpcom/data_access.js b/chrome/chromeFiles/content/scholar/xpcom/data_access.js index ed6d47e92..e9bd86711 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/data_access.js +++ b/chrome/chromeFiles/content/scholar/xpcom/data_access.js @@ -1231,6 +1231,10 @@ Scholar.Notes = new function(){ Scholar.DB.commitTransaction(); throw ("Cannot set note source to invalid item " + sourceItemID); } + if (sourceItem.isNote()){ + Scholar.DB.commitTransaction(); + throw ("Cannot set note source to another note (" + sourceItemID + ")"); + } } var note = Scholar.Items.getNewItemByType(Scholar.ItemTypes.getID('note'));