From: hickert Date: Thu, 22 Jun 2006 03:38:48 +0000 (+0000) Subject: Updated config source X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=aa26133f196b0c42cb491ed19f9d596255d9ab91;p=gosa.git Updated config source git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3859 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_plugin.inc b/include/class_plugin.inc index b205c00cd..f9cfa6aa4 100644 --- a/include/class_plugin.inc +++ b/include/class_plugin.inc @@ -995,7 +995,7 @@ class plugin } /* Get configuration from gosa.conf */ - $tmp = $this->config->data['MAIN']; + $tmp = $this->config->current; /* Check if the undo level is specified */ if(isset($tmp['SNAPSHOT_UNDO_LEVEL'])){ $UndoLvl = $tmp['SNAPSHOT_UNDO_LEVEL']; @@ -1011,7 +1011,8 @@ class plugin if(!isset($tmp['SNAPSHOT_SERVER'])){ /* Source and destination server are both the same, just copy source to dest obj */ - $ldap_to = $ldap; + $ldap_to = $ldap; + $snapldapbase = $this->config->current['BASE']; }else{ $server = $tmp['SNAPSHOT_SERVER']; @@ -1063,9 +1064,11 @@ class plugin } /* Inset this new snapshot */ + $ldap_to->cd($snapldapbase); $ldap_to->create_missing_trees($new_base); $ldap_to->cd($new_dn); $ldap_to->add($target); + show_ldap_error($ldap_to->get_error(), _("Create snapshot failed.")); show_ldap_error($ldap->get_error(), _("Create snapshot failed.")); @@ -1093,7 +1096,7 @@ class plugin There will also be some errors psoted, if the configuration failed */ function snapshotEnabled() { - $tmp = $this->config->data['MAIN']; + $tmp = $this->config->current; if(isset($tmp['ENABLE_SNAPSHOT'])){ if (preg_match("/^true$/i", $tmp['ENABLE_SNAPSHOT']) || preg_match("/yes/i", $tmp['ENABLE_SNAPSHOT'])){ @@ -1133,7 +1136,7 @@ class plugin points to our ldap snapshot server */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - $tmp = $this->config->data['MAIN']; + $tmp = $this->config->current; /* check if there are special server configurations for snapshots */ if(isset($tmp['SNAPSHOT_SERVER'])){ @@ -1189,7 +1192,7 @@ class plugin points to our ldap snapshot server */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - $tmp = $this->config->data['MAIN']; + $tmp = $this->config->current; /* check if there are special server configurations for snapshots */ if(isset($tmp['SNAPSHOT_SERVER'])){ @@ -1253,7 +1256,7 @@ class plugin $ldap= $this->config->get_ldap_link(); $ldap->cd($this->config->current['BASE']); - $tmp = $this->config->data['MAIN']; + $tmp = $this->config->current; /* check if there are special server configurations for snapshots */ if(isset($tmp['SNAPSHOT_SERVER'])){