mirror of
https://github.com/zotero/zotero.git
synced 2026-10-08 03:08:19 +00:00
Addresses #346, mapping for new item types
Fix for base field not being included (only type-specific fields) when searching by a base field
This commit is contained in:
parent
b1a025be92
commit
4ffaaa9eea
1 changed files with 6 additions and 4 deletions
|
|
@ -582,9 +582,14 @@ Zotero.Search.prototype._buildQuery = function(){
|
|||
break;
|
||||
}
|
||||
|
||||
// Add base field
|
||||
condSQLParams.push(
|
||||
Zotero.ItemFields.getID(condition['alias'])
|
||||
);
|
||||
var typeFields = Zotero.ItemFields.getTypeFieldsFromBase(condition['alias']);
|
||||
if (typeFields) {
|
||||
condSQL += 'fieldID IN (';
|
||||
condSQL += 'fieldID IN (?,';
|
||||
// Add type-specific fields
|
||||
for each(var fieldID in typeFields) {
|
||||
condSQL += '?,';
|
||||
condSQLParams.push(fieldID);
|
||||
|
|
@ -594,9 +599,6 @@ Zotero.Search.prototype._buildQuery = function(){
|
|||
}
|
||||
else {
|
||||
condSQL += 'fieldID=? AND ';
|
||||
condSQLParams.push(
|
||||
Zotero.ItemFields.getID(condition['alias'])
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue