summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8dee507)
raw | patch | inline | side by side (parent: 8dee507)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 25 Aug 2006 11:46:35 +0000 (11:46 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 25 Aug 2006 11:46:35 +0000 (11:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4516 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/addons/addressbook/class_addressbook.inc | patch | blob | history |
diff --git a/plugins/addons/addressbook/class_addressbook.inc b/plugins/addons/addressbook/class_addressbook.inc
index 615a5bbfb0589ed0a030c193c5d98ea2fa3d5abe..710df937a49110206a00bb866963702c6c533424 100644 (file)
"facsimileTelephoneNumber", "pager");
var $objectclasses= array("top", "person", "organizationalPerson", "inetOrgPerson");
+ var $abobjectclass= "dc=addressbook";
+
function addressbook ($config, $dn= NULL)
{
/* Include config object */
$this->config= $config;
+ $aoc = search_config($this->config->data['MENU'], "addressbook", "LDAP_OBJECT_CLASS");
+ if ($aoc != ""){
+ $this->abobjectclass = $aoc;
+ }
+
/* Get global filter config */
if (!is_global("phonefilter")){
$ui= get_userinfo();
$bases= array();
$filter= "";
if ($phonefilter['global'] == "checked"){
- $bases[]= preg_replace("/".$this->config->current['BASE']."/", "dc=addressbook,".$this->config->current['BASE'], $this->search_base);
+ $bases[]= preg_replace("/".$this->config->current['BASE']."/", $this->abobjectclass.",".$this->config->current['BASE'], $this->search_base);
} else {
$filter= '(objectClass=gosaAccount)';
}
$smarty->assign("info_$name", "-");
}
}
- if (preg_match("/,dc=addressbook,/", $_SESSION['show_info'])){
+ if (preg_match("/,".$this->abobjectclass.",/", $_SESSION['show_info'])){
$storage= _("global addressbook");
$smarty->assign("internal", 0);
} else {
/* Assemble cn/dn */
$this->cn= $this->givenName." ".$this->sn;
if ($this->orig_cn != $this->cn || $this->storage_base != $this->orig_storage_base){
- $this->new_dn= $this->create_unique_dn("cn", preg_replace("/,*".$this->config->current['BASE']."$/", "", $this->storage_base).",dc=addressbook,".$this->config->current['BASE']);
+ $this->new_dn= $this->create_unique_dn("cn", preg_replace("/,*".$this->config->current['BASE']."$/", "", $this->storage_base).",".$this->abobjectclass.",".$this->config->current['BASE']);
if ($this->new_dn == "none"){
$message[]= _("Cannot create a unique DN for your entry. Please fill more formular fields.");
return ($message);
{
/* Load base attributes */
plugin::plugin ($this->config, $this->dn);
- $this->storage_base= preg_replace('/^[^,]+,/', '', preg_replace('/dc=addressbook,/', '', $this->dn));
+ $this->storage_base= preg_replace('/^[^,]+,/', '', preg_replace('/'.$this->abobjectclass.',/', '', $this->dn));
}