mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Can force the request to get multiple groups.
This commit is contained in:
parent
1c1dbe8454
commit
e8df43351f
@ -167,7 +167,8 @@ function getInfoGroup(id, callback){
|
||||
*
|
||||
* @param {Array} IDs The IDs of the groups to get information about
|
||||
* @param {Function} callback Callback to call once we have information about the group
|
||||
* @param {Boolean} force TRUE to force the request (ignore cache)
|
||||
*/
|
||||
function getInfoMultipleGroups(IDs, callback){
|
||||
ComunicWeb.components.groups.info.getInfoMultiple(IDs, callback);
|
||||
function getInfoMultipleGroups(IDs, callback, force){
|
||||
ComunicWeb.components.groups.info.getInfoMultiple(IDs, callback, force);
|
||||
}
|
@ -44,14 +44,15 @@ ComunicWeb.components.groups.info = {
|
||||
*
|
||||
* @param {Array} list The list of the IDs of the group to get information about
|
||||
* @param {Function} callback
|
||||
* @param {Boolean} force TRUE to ignore cache (FALSE by default)
|
||||
*/
|
||||
getInfoMultiple: function(list, callback){
|
||||
getInfoMultiple: function(list, callback, force){
|
||||
|
||||
//First, check which group are unknown in the cache
|
||||
var toFetch = Array();
|
||||
|
||||
list.forEach(function(id){
|
||||
if(!ComunicWeb.components.groups.info._cache[id])
|
||||
if(!ComunicWeb.components.groups.info._cache[id] || force)
|
||||
toFetch.push(id);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user