mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
"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,10 +636,13 @@ 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)
|
||||||
{
|
{
|
||||||
$title =& self::get_cache($app,$id);
|
foreach(ExecMethod(self::$app_register[$app]['titles'],$ids) as $id => $t)
|
||||||
$titles[$id] = $title = $t;
|
{
|
||||||
|
$title =& self::get_cache($app,$id);
|
||||||
|
$titles[$id] = $title = $t;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $titles;
|
return $titles;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user