summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1973e17)
raw | patch | inline | side by side (parent: 1973e17)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 May 2010 08:41:56 +0000 (08:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 May 2010 08:41:56 +0000 (08:41 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18071 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_config.inc | patch | blob | history | |
gosa-core/include/class_configRegistry.inc | patch | blob | history |
index c76fc746c40b6e2ac45d994cedb41d56980d70be..fa7174269bb75f3ec17155dc0f220ac64ee946e0 100644 (file)
*/
function get_cfg_value($name, $default= "")
{
+
+ if($this->configRegistry->propertyExists('core',$name)){
+ return($this->configRegistry->getPropertyValue('core',$name));
+ }
+
$name= strtoupper($name);
/* Check if we have a current value for $name */
diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc
index 7520310d7f0acc3b7555a24c4a83263627bbd260..acfc29171f768be715469c2cd4e7b5be39e577a4 100644 (file)
$this->fileStoredProperties = array();
$this->properties = array();
$this->mapByClass = array();
+ $this->mapByName = array();
$this->mapPropertyToClass = array();
-
+
// Search for config flags defined in the config file (TAB section)
foreach($this->config->data['TABS'] as $tabname => $tabdefs){
foreach($tabdefs as $info){
}
$this->status = 'finished';
}
-
+
global $class_mapping;
foreach ($class_mapping as $cname => $path){
$cmethods = get_class_methods($cname);
foreach($this->properties as $prop){
$prop->save();
}
+ $this->reload(TRUE);
}
}
if(isset($this->parent->ldapStoredProperties[$this->class][$this->name])){
$this->setStatus('ldap');
$this->value = $this->parent->ldapStoredProperties[$this->class][$this->name];
+ return;
}
// Second check for values in the config file.
if(isset($this->parent->fileStoredProperties[$this->class][strtolower($this->name)])){
$this->setStatus('file');
$this->value = $this->parent->fileStoredProperties[$this->class][strtolower($this->name)];
+ return;
}
// If there still wasn't found anything then fallback to the default.
if(!$ldap->count()){
$ldap->cd($dn);
$data = array(
- 'cn' => $this->class,
- 'objectClass' => array('top','gosaConfig'),
- 'gosaSetting' => $this->name.":".$this->value);
+ 'cn' => $this->class,
+ 'objectClass' => array('top','gosaConfig'),
+ 'gosaSetting' => $this->name.":".$this->value);
$ldap->add($data);
- if($ldap->success()){
- $this->status = 'ldap';
- }else{
+ if(!$ldap->success()){
echo $ldap->get_error();
}
+ $this->_restoreCurrentValue();
+
}else{
$attrs = $ldap->fetch();
$data = array();
if(!$found) $data['gosaSetting'][] = "{$this->name}:{$this->value}";
$ldap->cd($dn);
$ldap->modify($data);
- if($ldap->success()){
- $this->status = 'ldap';
- }else{
+ if(!$ldap->success()){
echo $ldap->get_error();
}
+ $this->_restoreCurrentValue();
}
}elseif($this->getStatus() == 'removed'){
$ldap = $this->parent->config->get_ldap_link();
}
$ldap->cd($dn);
$ldap->modify($data);
- if($ldap->success()){
- $this->_restoreCurrentValue();
- }else{
+ if(!$ldap->success()){
echo $ldap->get_error();
}
+ $this->_restoreCurrentValue();
}
}