Not that it should happen, but survive an item with an item type of 0 or undefined (and more importantly, let you delete or change it)

This commit is contained in:
Dan Stillman 2006-09-12 05:20:43 +00:00
parent 7c3e054ebc
commit cc726ef333

View File

@ -3331,6 +3331,12 @@ Scholar.ItemFields = new function(){
return _itemTypeFields[itemTypeID];
}
if (!itemTypeID){
Scholar.debug("Invalid item type id '" + itemTypeID
+ "' provided to getItemTypeFields()", 1);
return [];
}
var sql = 'SELECT fieldID FROM itemTypeFields '
+ 'WHERE itemTypeID=' + itemTypeID + ' ORDER BY orderIndex';