diff --git a/gosa-core/include/class_SnapshotHandler.inc b/gosa-core/include/class_SnapshotHandler.inc
index 9f5b4833ab2a7b0b69e589f2d184f054f14608ad..bc912bdbadbaab693e25699bb899c6f9eee834fa 100644 (file)
$this->config = &$config;
$config = $this->config;
$this->config = &$config;
$config = $this->config;
- if($config->get_cfg_value("enableSnapshots") == "true"){
+ if($config->get_cfg_value("core","enableSnapshots") == "true"){
/* Check if the snapshot_base is defined */
/* Check if the snapshot_base is defined */
- if ($config->get_cfg_value("snapshotBase") == ""){
+ if ($config->get_cfg_value("core","snapshotBase") == ""){
/* Send message if not done already */
if(!session::is_set("snapshotFailMessageSend")){
/* Send message if not done already */
if(!session::is_set("snapshotFailMessageSend")){
}
/* check if there are special server configurations for snapshots */
}
/* check if there are special server configurations for snapshots */
- if ($config->get_cfg_value("snapshotURI") != ""){
+ if ($config->get_cfg_value("core","snapshotURI") != ""){
/* check if all required vars are available to create a new ldap connection */
$missing = "";
foreach(array("snapshotURI","snapshotAdminDn","snapshotAdminPassword","snapshotBase") as $var){
/* check if all required vars are available to create a new ldap connection */
$missing = "";
foreach(array("snapshotURI","snapshotAdminDn","snapshotAdminPassword","snapshotBase") as $var){
- if($config->get_cfg_value($var) == ""){
+ if($config->get_cfg_value("core",$var) == ""){
$missing .= $var." ";
/* Send message if not done already */
$missing .= $var." ";
/* Send message if not done already */
$snapshotLdap= null;
/* check if there are special server configurations for snapshots */
$snapshotLdap= null;
/* check if there are special server configurations for snapshots */
- if($this->config->get_cfg_value("snapshotURI") != ""){
- $server= $this->config->get_cfg_value("snapshotURI");
- $user= $this->config->get_cfg_value("snapshotAdminDn");
- $password= $this->config->get_credentials($this->config->get_cfg_value("snapshotAdminPassword"));
+ if($this->config->get_cfg_value("core","snapshotURI") != ""){
+ $server= $this->config->get_cfg_value("core","snapshotURI");
+ $user= $this->config->get_cfg_value("core","snapshotAdminDn");
+ $password= $this->config->get_credentials($this->config->get_cfg_value("core","snapshotAdminPassword"));
$snapshotLdap= new ldapMultiplexer(new LDAP($user,$password, $server));
}
/* Prepare bases */
$snapshotLdap= new ldapMultiplexer(new LDAP($user,$password, $server));
}
/* Prepare bases */
- $this->snapshotLdapBase= $this->config->get_cfg_value("snapshotBase");
+ $this->snapshotLdapBase= $this->config->get_cfg_value("core","snapshotBase");
$snapshotLdap->cd($this->snapshotLdapBase);
if (!$snapshotLdap->success()){
msg_dialog::display(_("LDAP error"), msgPool::ldaperror($snapshotLdap->get_error(), $this->snapshotLdapBase, "", get_class()));
$snapshotLdap->cd($this->snapshotLdapBase);
if (!$snapshotLdap->success()){
msg_dialog::display(_("LDAP error"), msgPool::ldaperror($snapshotLdap->get_error(), $this->snapshotLdapBase, "", get_class()));
$ldap->cd($this->config->current['BASE']);
/* check if there are special server configurations for snapshots */
$ldap->cd($this->config->current['BASE']);
/* check if there are special server configurations for snapshots */
- if($config->get_cfg_value("snapshotURI") == ""){
+ if($config->get_cfg_value("core","snapshotURI") == ""){
/* Source and destination server are both the same, just copy source to dest obj */
$ldap_to = $ldap;
$snapldapbase = $this->config->current['BASE'];
}else{
/* Source and destination server are both the same, just copy source to dest obj */
$ldap_to = $ldap;
$snapldapbase = $this->config->current['BASE'];
}else{
- $server = $config->get_cfg_value("snapshotURI");
- $user = $config->get_cfg_value("snapshotAdminDn");
- $password = $this->config->get_credentials($config->get_cfg_value("snapshotAdminPassword"));
- $snapldapbase = $config->get_cfg_value("snapshotBase");
+ $server = $config->get_cfg_value("core","snapshotURI");
+ $user = $config->get_cfg_value("core","snapshotAdminDn");
+ $password = $this->config->get_credentials($config->get_cfg_value("core","snapshotAdminPassword"));
+ $snapldapbase = $config->get_cfg_value("core","snapshotBase");
$ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to -> cd($snapldapbase);
$ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to -> cd($snapldapbase);
/* Collect some infos */
$base = $this->config->current['BASE'];
/* Collect some infos */
$base = $this->config->current['BASE'];
- $snap_base = $config->get_cfg_value("snapshotBase");
+ $snap_base = $config->get_cfg_value("core","snapshotBase");
$base_of_object = preg_replace ('/^[^,]+,/i', '', $dn);
$new_base = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
$base_of_object = preg_replace ('/^[^,]+,/i', '', $dn);
$new_base = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
$cfg= &$this->config->current;
/* check if there are special server configurations for snapshots */
$cfg= &$this->config->current;
/* check if there are special server configurations for snapshots */
- if($this->config->get_cfg_value("snapshotURI") == ""){
+ if($this->config->get_cfg_value("core","snapshotURI") == ""){
$ldap_to = $ldap;
}else{
$ldap_to = $ldap;
}else{
- $server = $this->config->get_cfg_value("snapshotURI");
- $user = $this->config->get_cfg_value("snapshotAdminDn");
- $password = $this->config->get_credentials($this->config->get_cfg_value("snapshotAdminPassword"));
- $snapldapbase = $this->config->get_cfg_value("snapshotBase");
+ $server = $this->config->get_cfg_value("core","snapshotURI");
+ $user = $this->config->get_cfg_value("core","snapshotAdminDn");
+ $password = $this->config->get_credentials($this->config->get_cfg_value("core","snapshotAdminPassword"));
+ $snapldapbase = $this->config->get_cfg_value("core","snapshotBase");
$ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to -> cd($snapldapbase);
if (!$ldap_to->success()){
$ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to -> cd($snapldapbase);
if (!$ldap_to->success()){
}
/* Prepare bases and some other infos */
$base = $this->config->current['BASE'];
}
/* Prepare bases and some other infos */
$base = $this->config->current['BASE'];
- $snap_base = $this->config->get_cfg_value("snapshotBase");
+ $snap_base = $this->config->get_cfg_value("core","snapshotBase");
$base_of_object = preg_replace ('/^[^,]+,/i', '', $dn);
$new_base = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
$tmp = array();
$base_of_object = preg_replace ('/^[^,]+,/i', '', $dn);
$new_base = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
$tmp = array();
$cfg= &$this->config->current;
/* check if there are special server configurations for snapshots */
$cfg= &$this->config->current;
/* check if there are special server configurations for snapshots */
- if($this->config->get_cfg_value("snapshotURI") == ""){
+ if($this->config->get_cfg_value("core","snapshotURI") == ""){
$ldap_to = $ldap;
}else{
$ldap_to = $ldap;
}else{
- $server = $this->config->get_cfg_value("snapshotURI");
- $user = $this->config->get_cfg_value("snapshotAdminDn");
- $password = $this->config->get_credentials($this->config->get_cfg_value("snapshotAdminPassword"));
- $snapldapbase = $this->config->get_cfg_value("snapshotBase");
+ $server = $this->config->get_cfg_value("core","snapshotURI");
+ $user = $this->config->get_cfg_value("core","snapshotAdminDn");
+ $password = $this->config->get_credentials($this->config->get_cfg_value("core","snapshotAdminPassword"));
+ $snapldapbase = $this->config->get_cfg_value("core","snapshotBase");
$ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to -> cd($snapldapbase);
if (!$ldap_to->success()){
$ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to -> cd($snapldapbase);
if (!$ldap_to->success()){
/* Prepare bases */
$base = $this->config->current['BASE'];
/* Prepare bases */
$base = $this->config->current['BASE'];
- $snap_base = $this->config->get_cfg_value("snapshotBase");
+ $snap_base = $this->config->get_cfg_value("core","snapshotBase");
$new_base = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
/* Fetch all objects and check if they do not exist anymore */
$ui = get_userinfo();
$new_base = preg_replace("/".preg_quote($base, '/')."$/","",$base_of_object).$snap_base;
/* Fetch all objects and check if they do not exist anymore */
$ui = get_userinfo();
$cfg= &$this->config->current;
/* check if there are special server configurations for snapshots */
$cfg= &$this->config->current;
/* check if there are special server configurations for snapshots */
- if($this->config->get_cfg_value("snapshotURI") == ""){
+ if($this->config->get_cfg_value("core","snapshotURI") == ""){
$ldap_to = $ldap;
}else{
$ldap_to = $ldap;
}else{
- $server = $this->config->get_cfg_value("snapshotURI");
- $user = $this->config->get_cfg_value("snapshotAdminDn");
- $password = $this->config->get_credentials($this->config->get_cfg_value("snapshotAdminPassword"));
- $snapldapbase = $this->config->get_cfg_value("snapshotBase");
+ $server = $this->config->get_cfg_value("core","snapshotURI");
+ $user = $this->config->get_cfg_value("core","snapshotAdminDn");
+ $password = $this->config->get_credentials($this->config->get_cfg_value("core","snapshotAdminPassword"));
+ $snapldapbase = $this->config->get_cfg_value("core","snapshotBase");
$ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to -> cd($snapldapbase);
if (!$ldap_to->success()){
$ldap_to = new ldapMultiplexer(new LDAP($user,$password, $server));
$ldap_to -> cd($snapldapbase);
if (!$ldap_to->success()){