forked from extern/egroupware
"Maximum number of titles to query from an application at once (to NOT trash mysql)"
This commit is contained in:
parent
8bbe6d79df
commit
0af8b60e39
@ -597,6 +597,11 @@ class egw_link extends solink
|
|||||||
return $title;
|
return $title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum number of titles to query from an application at once (to NOT trash mysql)
|
||||||
|
*/
|
||||||
|
const MAX_TITLES_QUERY = 100;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query the titles off multiple id's of one app
|
* Query the titles off multiple id's of one app
|
||||||
*
|
*
|
||||||
@ -631,12 +636,15 @@ class egw_link extends solink
|
|||||||
}
|
}
|
||||||
if ($ids_to_query)
|
if ($ids_to_query)
|
||||||
{
|
{
|
||||||
foreach(ExecMethod(self::$app_register[$app]['titles'],$ids_to_query) as $id => $t)
|
for ($n = 0; $ids = array_slice($ids_to_query,$n*MAX_TITLES_QUERY,100); ++$n)
|
||||||
|
{
|
||||||
|
foreach(ExecMethod(self::$app_register[$app]['titles'],$ids) as $id => $t)
|
||||||
{
|
{
|
||||||
$title =& self::get_cache($app,$id);
|
$title =& self::get_cache($app,$id);
|
||||||
$titles[$id] = $title = $t;
|
$titles[$id] = $title = $t;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $titles;
|
return $titles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user