summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: caf012c)
raw | patch | inline | side by side (parent: caf012c)
author | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 29 Jun 2010 15:12:18 +0000 (15:12 +0000) | ||
committer | psc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 29 Jun 2010 15:12:18 +0000 (15:12 +0000) |
Avoid repeating LDAP queries on every log request
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@18874 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@18874 594d385d-05f5-0310-b6e9-bd551577e9d8
trunk/gosa-core/include/class_log.inc | patch | blob | history |
index ed93a631ce0f32a99f4ff83a39cabeff0aabea6e..045cca27f2838971828563a10909db4ce02c1ebf 100644 (file)
$ui = get_userinfo();
if (isset($config->current['HONOURUNITTAGS']) &&
preg_match('/true/i', $config->current['HONOURUNITTAGS']) &&
- $ui->gosaUnitTag != '') {
+ $ui->gosaUnitTag != '' &&
+ !isset($config->data['SERVERS']['LOGGING'][$server_name]['UNITTAG'])) {
$ldap = $this->config->get_ldap_link() ;
$ldap->cd($this->config->current['BASE']);
$ldap->search("(&(&(objectClass=gosaLogServer)(gosaUnitTag=$ui->gosaUnitTag)(cn=$server_name)))");
unset($config->data['SERVERS']['LOGGING'][$server_name]);
$this->config = $config;
continue;
+ } else {
+ /* Add gosaUnitTag to config for future reference
+ */
+ $config->data['SERVERS']['LOGGING'][$server_name]['UNITTAG'] = $ui->gosaUnitTag;
+ $this->config = $config;
}
}