From cf1248ba9e7dc25563d05be208957bb006481f4d Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 22 May 2006 04:18:17 +0000 Subject: [PATCH] Moved conferences from base to ,ou=conferences,ou=asterisk,ou=configs,ou=systems, git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3472 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../gofon/conference/class_phoneConferenceGeneric.inc | 11 ++++++----- .../conference/class_phoneConferenceManagment.inc | 2 +- plugins/gofon/conference/tabs_conference.inc | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/gofon/conference/class_phoneConferenceGeneric.inc b/plugins/gofon/conference/class_phoneConferenceGeneric.inc index 7b5fed530..ab70ac5fb 100644 --- a/plugins/gofon/conference/class_phoneConferenceGeneric.inc +++ b/plugins/gofon/conference/class_phoneConferenceGeneric.inc @@ -466,16 +466,17 @@ class conference extends plugin } $ldap= $this->config->get_ldap_link(); - + $ldap->cd($this->config->current['BASE']); $ldap->cat($this->dn, array('dn')); - $a= $ldap->fetch(); - $ldap->cd($this->dn); - if (count($a)){ + + if ($ldap->count()){ + $ldap->cd($this->dn); $this->cleanup(); $ldap->modify ($this->attrs); - $this->handle_post_events('modify'); } else { + $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn)); + $ldap->cd($this->dn); $ldap->add($this->attrs); $this->handle_post_events('add'); } diff --git a/plugins/gofon/conference/class_phoneConferenceManagment.inc b/plugins/gofon/conference/class_phoneConferenceManagment.inc index a6a20c7d2..5bf53a119 100644 --- a/plugins/gofon/conference/class_phoneConferenceManagment.inc +++ b/plugins/gofon/conference/class_phoneConferenceManagment.inc @@ -269,7 +269,7 @@ class phoneConferenceManagment extends plugin */ function reload() { - $Base = $this->DivListConference->selectedBase; + $Base = "ou=conferences,ou=asterisk,ou=configs,ou=systems,".$this->DivListConference->selectedBase; $SubSearch = $this->DivListConference->SubSearch; $Regex = $this->DivListConference->Regex; $Flags = GL_SIZELIMIT ; diff --git a/plugins/gofon/conference/tabs_conference.inc b/plugins/gofon/conference/tabs_conference.inc index e6e800aed..05271c084 100644 --- a/plugins/gofon/conference/tabs_conference.inc +++ b/plugins/gofon/conference/tabs_conference.inc @@ -19,7 +19,7 @@ class conferencetabs extends tabs function save() { $baseobject= $this->by_object['conference']; - $new_dn= 'cn='.$baseobject->cn.','.$baseobject->base; + $new_dn= 'cn='.$baseobject->cn.',ou=conferences,ou=asterisk,ou=configs,ou=systems,'.$baseobject->base; if(strtolower($this->dn)==strtolower($new_dn)){ $this->dn=$new_dn; -- 2.30.2