Fix error dragging items from My Library to group library

This commit is contained in:
Dan Stillman 2013-11-06 11:16:58 -05:00
parent 48a852fb32
commit 92ef3d6c81
2 changed files with 4 additions and 2 deletions

View file

@ -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);

View file

@ -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=?";