commit 92ef3d6c81f7fa36599fe6f957d89175e4ad8dc0
parent 48a852fb32a658ec28b2f488bf28f613b2ade4f5
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 6 Nov 2013 11:16:58 -0500
Fix error dragging items from My Library to group library
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/dataObjects.js b/chrome/content/zotero/xpcom/data/dataObjects.js
@@ -342,9 +342,11 @@ Zotero.DataObjects = function (object, objectPlural, id, table) {
if (!libraryID) {
return true;
}
-
var type = Zotero.Libraries.getType(libraryID);
switch (type) {
+ case 'user':
+ return true;
+
case 'group':
var groupID = Zotero.Groups.getGroupIDFromLibraryID(libraryID);
var group = Zotero.Groups.get(groupID);
diff --git a/chrome/content/zotero/xpcom/data/libraries.js b/chrome/content/zotero/xpcom/data/libraries.js
@@ -63,7 +63,7 @@ Zotero.Libraries = new function () {
this.getType = function (libraryID) {
- if (libraryID === 0) {
+ if (libraryID === 0 || libraryID == Zotero.libraryID) {
return 'user';
}
var sql = "SELECT libraryType FROM libraries WHERE libraryID=?";