summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8c44ba2)
raw | patch | inline | side by side (parent: 8c44ba2)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 25 Aug 2006 11:46:04 +0000 (11:46 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 25 Aug 2006 11:46:04 +0000 (11:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4515 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 9302a187a2cb1db559aaef7f80033a7d2edb6f3b..ae56b8d36be962ff4f1cac0edce20beac7fea68b 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));
}