mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Merged V4.1-BUG-FIX (4.1.8) to V4.2-BUG-FIX (4.2.1)
57904: Fix for MNT-9947 - Advanced search returns no result if using numberrange.ftl control git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/V4.2-BUG-FIX/root@57922 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -953,8 +953,24 @@ function getSearchResults(params)
|
||||
}
|
||||
else
|
||||
{
|
||||
// single pseudo cm:content property - e.g. mimetype, size or encoding
|
||||
formQuery += (first ? '' : ' AND ') + 'cm:content.' + propName + ':"' + propValue + '"';
|
||||
// special case for size-range property
|
||||
if (propName.match("size-range$") == "size-range" && propValue.length > 1)
|
||||
{
|
||||
var from, to, sepindex = propValue.indexOf("|");
|
||||
|
||||
propName = propName.substr(0, propName.length - "-range".length);
|
||||
|
||||
// work out if "min" and/or "max" are specified - use MIN and MAX otherwise
|
||||
from = (sepindex === 0 ? "MIN" : propValue.substr(0, sepindex));
|
||||
to = (sepindex === propValue.length - 1 ? "MAX" : propValue.substr(sepindex + 1));
|
||||
|
||||
formQuery += (first ? '' : ' AND ') + '@cm\\:content.' + propName + ':[' + from + ' TO ' + to + ']';
|
||||
}
|
||||
else
|
||||
{
|
||||
// single pseudo cm:content property - e.g. mimetype, size or encoding
|
||||
formQuery += (first ? '' : ' AND ') + 'cm:content.' + propName + ':"' + propValue + '"';
|
||||
}
|
||||
}
|
||||
first = false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user