Neil McErlean cd38dfbfeb Fix for ALF-20023 Recent Sites and Favourite Sites in copy/move pickers empty
So the bug was caused by 2 problems: one in ScriptPreferenceService and one in person.sites.get.js
The first problem was that ScriptPreferenceService constructs raw Mozilla NativeObjects - a very unusual practice in itself - and it does not provide a default value as required by ECMA 9.1 from the ECMA standard. I've added this code to the NativeObject (can't change the type to ScriptableHashMap<K, V> or similar as the API is published).
I've also fixed the same bug (unreported, possibly never apparent) in a jbpm class.
The second problem was that person.sites.get.js simply could never return preferences data if the caller provided a filter (favourites or recents) and did not also provide a page size.
There was a logic error in the algorithm such that the size defaulted to 0 thus providing a 'page' of zero results as a default.
I assume this is a merge error from cloud, but I don't know.
I added tests for the JavaScript API's favourites/recents filter calls and logging here and there.
Also deleted some dead code.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55474 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2013-09-18 15:27:51 +00:00
..