summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 96c99e3)
raw | patch | inline | side by side (parent: 96c99e3)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 May 2010 13:33:13 +0000 (13:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 10 May 2010 13:33:13 +0000 (13:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18275 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc
index 209b14fca746c7e8de51080e52e72219c4f1c72e..24e614dbbd4485b6d29350071c46c01b27779203 100644 (file)
$this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
$this->cn= "";
} else {
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("componentRDN"), '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("componentGeneric", "componentRDN") , '/')."/i", "", $this->dn);
}
$this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, true);
/* Save dn for later references */
$message= plugin::check();
$message= array_merge($message,$this->netConfigDNS->check());
- $this->dn= "cn=".$this->cn.",".get_ou('componentRDN').$this->base;
+ $this->dn= "cn=".$this->cn.",".get_ou("componentGeneric", "componentRDN") .$this->base;
if ($this->cn == "" ){
$message[]= msgPool::required(_("Component name"));
if(preg_match("/cn=dhcp,/",$attrs['dn'])){
continue;
}
- if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("componentRDN"), '/')."/i",$attrs['dn'])){
+ if ($attrs['dn'] != $this->orig_dn && preg_match("/".preg_quote(get_ou("componentGeneric", "componentRDN") , '/')."/i",$attrs['dn'])){
$message[]= msgPool::duplicated(_("Component name"));
break;
}
diff --git a/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc b/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc
index d794cc807424ed315f00d06e2ea689428d6b2850..f20158e1305b08920dff079699296daf7d01d7a1 100644 (file)
foreach($entries as $key => $entry){
- if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'),'/')."/i", $entry['dn'])){
+ if(preg_match("/".preg_quote(get_ou("ArpNewDevice", "systemIncomingRDN") ,'/')."/i", $entry['dn'])){
// Detect incoming types
if(in_array('gotoWorkstation', $entry['objectClass'])){
diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc
index d8891da71c6f4c9143e83e24466de7270bfc34fe..1c6ac0c291a4b0885965a16b79f185bf0ef0ee85 100644 (file)
$ui= get_userinfo();
$this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
$this->cn= "";
- } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
+ } elseif(preg_match("/".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i", $this->dn)){
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i", "", $this->dn);
} else {
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("serverRDN"), '/')."/i", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i", "", $this->dn);
}
$this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
$this->netConfigDNS->set_acl_category("server");
/* Call common method to give check the hook */
$message= plugin::check();
$message= array_merge($message, $this->netConfigDNS->check());
- $this->dn= "cn=".$this->cn.",".get_ou('serverRDN').$this->base;
+ $this->dn= "cn=".$this->cn.",".get_ou("servgeneric", "serverRDN") .$this->base;
/* must: cn */
if ($this->cn == ""){
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
if ($attrs['dn'] != $this->orig_dn){
- if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$attrs['dn']) && preg_match("/,".preg_quote(get_ou('serverRDN'), '/')."/i",$attrs['dn'])){
+ if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i",$attrs['dn']) && preg_match("/,".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i",$attrs['dn'])){
$message[]= msgPool::duplicated(_("Server name"));
break;
}
}
/* Warn the user, that this host is currently installing */
- if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i",$this->orig_dn)){
+ if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("servgeneric", "serverRDN") , '/')."/i",$this->orig_dn)){
/* Force aborting without message dialog */
$message[] = "";
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index d6934e9e2507e86073ba72418f22c5d5560d00f7..5c2c7887c207e4d6b60b9660c185468224d17d3a 100644 (file)
*/
static function incomingFilterConverter($filter)
{
- $rdn = preg_replace("/^[^=]*=/", "", get_ou('systemIncomingRDN'));
+ $rdn = preg_replace("/^[^=]*=/", "", get_ou("group", "ogroupRDN") );
$rdn = preg_replace("/,.*$/","",$rdn);
return(preg_replace("/%systemIncomingRDN/", $rdn,$filter));
}
$data['OG'], "<b>Selected ogroup:</b>");
if($data['OG'] != "none"){
- $this->tabObject->base = preg_replace("/^[^,]+,".preg_quote(get_ou('ogroupRDN'), '/')."/i", "", $data['OG']);
+ $this->tabObject->base = preg_replace("/^[^,]+,".preg_quote(get_ou("group", "ogroupRDN") , '/')."/i", "", $data['OG']);
$this->tabObject->by_object[$plugClass]->baseSelector->setBase($this->tabObject->base);
} else {
$this->tabObject->by_object[$plugClass]->baseSelector->setBase($headpage->getBase());
"aclCategory" => "opsi"),
"goServer" => array(
- "ou" => get_ou('serverRDN'),
+ "ou" => get_ou("group", "ogroupRDN") ,
"plugClass" => "servgeneric",
"tabClass" => "servtabs",
"tabDesc" => "SERVTABS",
"aclCategory" => "server"),
"gotoWorkstation" => array(
- "ou" => get_ou('workstationRDN'),
+ "ou" => get_ou("group", "ogroupRDN") ,
"plugClass" => "workgeneric",
"tabClass" => "worktabs",
"tabDesc" => "WORKTABS",
"aclCategory" => "workstation"),
"gotoTerminal" => array(
- "ou" => get_ou('terminalRDN'),
+ "ou" => get_ou("group", "ogroupRDN") ,
"plugClass" => "termgeneric",
"tabClass" => "termtabs",
"sendEvents" => TRUE,
"aclCategory" => "terminal"),
"gotoPrinter" => array(
- "ou" => get_ou('printerRDN'),
+ "ou" => get_ou("group", "ogroupRDN") ,
"plugClass" => "printgeneric",
"tabClass" => "printtabs",
"tabDesc" => "PRINTTABS",
"aclCategory" => "printer"),
"FAKE_OC_NewDevice" => array(
- "ou" => get_ou('systemIncomingRDN'),
+ "ou" => get_ou("group", "ogroupRDN") ,
"plugClass" => "termgeneric",
"tabClass" => "termtabs",
"sendEvents" => TRUE,
"aclCategory" => "terminal"),
"goFonHardware" => array(
- "ou" => get_ou('phoneRDN'),
+ "ou" => get_ou("group", "ogroupRDN") ,
"plugClass" => "phoneGeneric",
"tabClass" => "phonetabs",
"tabDesc" => "PHONETABS",
"aclCategory" => "winworkstation"),
"ieee802Device" => array(
- "ou" => get_ou('componentRDN'),
+ "ou" => get_ou("group", "ogroupRDN") ,
"plugClass" => "componentGeneric",
"sendEvents" => FALSE,
"tabClass" => "componenttabs",
diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc
index dc37a189764298d1204f79dda65bfe547c31b61e..b12a4ef586e0b9ca0d04cbec4bc8c8f4be0f665e 100644 (file)
over the whole ldap server was 10 to 20 times slower.
*/
$deps = array();
- $ou = preg_replace("/,.*$/","",get_ou("systemRDN"));
- $a_ous = array(get_ou("serverRDN"),
- get_ou("terminalRDN"),
- get_ou("workstationRDN"),
- get_ou("printerRDN"),
- get_ou("phoneRDN"),
- get_ou("componentRDN"));
+ $ou = preg_replace("/,.*$/","",get_ou("servgeneric", "serverRDN") );
+ $a_ous = array(get_ou("servgeneric", "serverRDN") ,
+ get_ou("servgeneric", "serverRDN") ,
+ get_ou("servgeneric", "serverRDN") ,
+ get_ou("servgeneric", "serverRDN") ,
+ get_ou("servgeneric", "serverRDN") ,
+ get_ou("servgeneric", "serverRDN") );
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->config->current['BASE']);
diff --git a/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc b/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc
index c46ce62863705d28a5d6484e6b0035d02fbd1d8f..514767832ec4e3105f78c4e232666ec1232958f8 100644 (file)
{
$this->config = $config;
$this->ui = $ui;
- $this->storagePoints = array(get_ou("serverRDN"), get_ou("workstationRDN"), get_ou('terminalRDN'));
+ $this->storagePoints = array(get_ou("servgeneric", "serverRDN") , get_ou("servgeneric", "serverRDN") , get_ou("servgeneric", "serverRDN") );
// Build filter
if (session::global_is_set(get_class($this)."_filter")){
diff --git a/gosa-plugins/systems/admin/systems/tabs_component.inc b/gosa-plugins/systems/admin/systems/tabs_component.inc
index 5dfc787ccf7b029404c4fe6163534fee7559b9b5..7a227af14b74e31b89b5866bbeccf7401d23cab5 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
$baseobject= $this->by_object['componentGeneric'];
- $this->dn= "cn=$baseobject->cn,".get_ou('componentRDN').$baseobject->base;
+ $this->dn= "cn=$baseobject->cn,".get_ou("componentGeneric", "componentRDN") .$baseobject->base;
if($this->dn != $baseobject->orig_dn && $baseobject->orig_dn != "new"){
diff --git a/gosa-plugins/systems/admin/systems/tabs_server.inc b/gosa-plugins/systems/admin/systems/tabs_server.inc
index ea977581a05597e6bf26fc7f8819b7873ffab1d4..4435c6cfb262da4417ae636a4b43e8e451f30533 100644 (file)
/* Check for new 'dn', in order to propagate the
'dn' to all plugins */
$baseobject= $this->by_object['servgeneric'];
- $this->dn= "cn=$baseobject->cn,".get_ou('serverRDN').$baseobject->base;
+ $this->dn= "cn=$baseobject->cn,".get_ou("servgeneric", "serverRDN") .$baseobject->base;
/* cn is not case sensitive for ldap, but for php it is!! */
if($baseobject->orig_dn != "new"){