summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 85bf6d9)
raw | patch | inline | side by side (parent: 85bf6d9)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 6 Nov 2009 17:00:59 +0000 (17:00 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 6 Nov 2009 17:00:59 +0000 (17:00 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14789 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc
index 2e266a903c1e7c0fa4dbd2239c976fc60821ca4c..62d3ff86838edb883c9084e8368c3dd6437417e9 100644 (file)
$this->base= dn2base($ui->dn);
}
} else {
- $this->base= preg_replace ("/^.*,".preg_quote(get_ou("mimetypeRDN"), '/')."/", "", $this->dn);
+ $this->base= preg_replace ("/^.*,".preg_quote(get_ou("mimetypeRDN"), '/')."/i", "", $this->dn);
}
/* Get icon data */
diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
index f7be97b7e4aebb8e8f6bb4ccf5b0d660aadfa7ea..5074c325f97ea9c41dc0c1b80cff5ba80e785629 100644 (file)
if(!$this->IsReleaseManagementActivated()){
$use_base = $this->mime_base;
if($SubSearch){
- $use_base = preg_replace("/^".preg_quote(get_ou("mimeou"), '/')."/","",$use_base);
+ $use_base = preg_replace("/^".preg_quote(get_ou("mimeou"), '/')."/i","",$use_base);
}
}else{
$use_base = $this->mime_release;
if($this->start_pasting_copied_objects && $this->CopyPasteHandler->entries_queued()){
/* Get dialog */
- $this->CopyPasteHandler->SetVar("base",preg_replace("/^".preg_quote(get_ou("mimetypeRDN"), '/')."/","",$this->mime_base));
+ $this->CopyPasteHandler->SetVar("base",preg_replace("/^".preg_quote(get_ou("mimetypeRDN"), '/')."/i","",$this->mime_base));
$this->CopyPasteHandler->SetVar("parent",$this);
$data = $this->CopyPasteHandler->execute();
diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 9473158f32063f23800ca56d54e9ac7478edce18..809cd7292845a80ab061329f0271b5af768cd31f 100644 (file)
/* Update dn, to ensure storing as printer instead of WS / terminal */
if(preg_match("/Terminal/i",$this->BelongsTo) || preg_match("/TerminalTemplate/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
if(preg_match("/Workstation/i",$this->BelongsTo) || preg_match("/WorkstationTemplate/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
$this->orig_dn = $this->dn;
} else {
/* Set base and check if the extracted base exists */
- if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/",$this->dn)){
- $this->base= preg_replace("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/","",dn2base($this->dn));
+ if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$this->dn)){
+ $this->base= preg_replace("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i","",dn2base($this->dn));
}else{
- $this->base= preg_replace("/".preg_quote(get_ou('printerRDN'), '/')."/","",dn2base($this->dn));
+ $this->base= preg_replace("/".preg_quote(get_ou('printerRDN'), '/')."/i","",dn2base($this->dn));
}
if(!isset($this->config->idepartments[$this->base])){
/* Update dn, to ensure storing as printer instead of WS / terminal
*/
if(preg_match("/terminal/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
if(preg_match("/workstation/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
/* Detect if this is a valid printer account;
/* Update dn, to ensure storing as printer instead of WS / terminal
*/
if(preg_match("/terminal/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/').",/",get_ou('printerRDN'),$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/').",/i",get_ou('printerRDN'),$this->dn);
}
if(preg_match("/workstation/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
/* Check if this dn points to a printer, to avoid deleting something else */
/* Update dn, to ensure storing as printer instead of WS / terminal
*/
if(preg_match("/terminal/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('terminalRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
if(preg_match("/workstation/i",$this->BelongsTo)){
- $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/",get_ou('printerRDN'),$this->dn);
+ $this->dn= preg_replace("/".preg_quote(get_ou('workstationRDN'), '/')."/i",get_ou('printerRDN'),$this->dn);
}
if(!$this->is_account) return;
}
/* Ensure to create a new object */
- if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/",$this->orig_dn)){
+ if(preg_match("/".preg_quote(get_ou('systemIncomingRDN'), '/')."/i",$this->orig_dn)){
$this->orig_dn = "new";
}
diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalGeneric.inc
index 766eb1fe7dc51809cb0e1e9a71d2bfff8ab1ec43..8ad176317100d74e563ecff88a75258d63f6f23e 100644 (file)
$ui= get_userinfo();
$this->base= dn2base($ui->dn);
} else {
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("terminalRDN"), '/')."/", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("terminalRDN"), '/')."/i", "", $this->dn);
}
/* Create an array of all Syslog servers */
}
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
- if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/", $ldap->getDN())){
+ if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i", $ldap->getDN())){
continue;
} else {
if ($attrs['dn'] != $this->orig_dn){
$ldap= $this->config->get_ldap_link();
/* Strip relevant part from dn, keep trailing ',' */
- $tmp= preg_replace("/^cn=[^,]+,".get_ou('terminalRDN')."/i", "", $this->dn);
+ $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou('terminalRDN'), '/')."/i", "", $this->dn);
$tmp= preg_replace("/".$this->config->current['BASE']."$/i", "", $tmp);
/* Walk from top to base and try to load default values for
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationGeneric.inc
index b45deb6a5ce10569b35e09c583e6603cfaa7ef89..dd6a3837ef715ace015411585905a38d9e5d4670 100644 (file)
}
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
- if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".get_ou('systemIncomingRDN')."/", $ldap->getDN())){
+ if (preg_match("/cn=dhcp,/",$attrs['dn']) || preg_match ("/,".preg_quote(get_ou('systemIncomingRDN'), '/')."/i", $ldap->getDN())){
continue;
} else {
if ($attrs['dn'] != $this->orig_dn){
}else{
/* Warn the user, that this host is currently installing */
if($this->currently_installing && !$this->currently_installing_warned &&
- !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->orig_dn)){
+ !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i",$this->orig_dn)){
/* Force aborting without message dialog */
$message[] = "";
diff --git a/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc b/gosa-plugins/goto/admin/systems/goto/class_workstationStartup.inc
index 94aec44278f2a4c457d8f0e97d94e784d033a039..be726ecb4b9f7695ad93bc0b60c1eac33d431499 100644 (file)
$ldap= $this->config->get_ldap_link();
/* Strip relevant part from dn, keep trailing ',' */
- $tmp= preg_replace("/^cn=[^,]+,".get_ou('terminalRDN')."/i", "", $this->dn);
+ $tmp= preg_replace("/^cn=[^,]+,".preg_quote(get_ou('terminalRDN'), '/')."/i", "", $this->dn);
$tmp= preg_replace("/".$this->config->current['BASE']."$/i", "", $tmp);
/* Walk from top to base and try to load default values for
*/
function dn_to_release_name($dn)
{
- $relevant = preg_replace("/,".preg_quote(get_ou("faiBaseRDN"), '/').".*$/","",$dn);
+ $relevant = preg_replace("/,".preg_quote(get_ou("faiBaseRDN"), '/').".*$/i","",$dn);
$parts = array_reverse(split("\,",$relevant));
$str ="";
foreach($parts as $part){
diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc
index acbdf87ed035567d14de2df5e07c6e3d513f1402..cf5ca5f88f9aab357117b9f1d325191462581357 100644 (file)
plugin::plugin ($config, $dn, $parent);
- /* Initialize kerberos host key plugin */
- if(class_available("krbHostKeys")){
- $this->kerberos_key_service = new krbHostKeys($this->config,$this);
- }
-
+ /* Initialize */
$this->ui = get_userinfo();
$this->modes["active"]= _("Activated");
$this->modes["locked"]= _("Locked");
$this->base= dn2base($ui->dn);
$this->cn= "";
} else {
- $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("serverRDN"), '/')."/", "", $this->dn);
+ $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("serverRDN"), '/')."/i", "", $this->dn);
}
$this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
$this->netConfigDNS->set_acl_category("server");
$this->netConfigDNS->set_acl_base($this->base);
$this->netConfigDNS->MACisMust =TRUE;
+ /* Initialize kerberos host key plugin */
+ if(class_available("krbHostKeys")){
+ $this->kerberos_key_service = new krbHostKeys($this->config,$this);
+ }
+
/* Check if this host is currently in installation process*/
if($this->dn != "new" && class_available("gosaSupportDaemon") && class_available("DaemonEvent")){
$o = new gosaSupportDaemon();
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
if ($attrs['dn'] != $this->orig_dn){
- if(!preg_match("/cn=dhcp,/",$attrs['dn']) && !preg_match("/,".get_ou('systemIncomingRDN')."/",$attrs['dn']) && preg_match("/,".get_ou('serverRDN')."/",$attrs['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'])){
$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"), '/')."/",$this->orig_dn)){
+ if($this->currently_installing && !$this->currently_installing_warned && !preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/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 84bd5b2b59ea8ac4a49a7405d20fd79b875b0e09..9caaffdcf557651f865ac4f4ab4e12c09e51ac4f 100644 (file)
$this->systab= new $tabclass($this->config, $this->config->data['TABS'][$class], $this->dn, $selected_system);
$this->systab->set_acl_base($this->DivListSystem->selectedBase);
if($selected_group != "none"){
- $this->systab->base = preg_replace("/^[^,]+,".get_ou('ogroupRDN')."/", "", $selected_group);
+ $this->systab->base = preg_replace("/^[^,]+,".preg_quote(get_ou('ogroupRDN'), '/')."/i", "", $selected_group);
$this->systab->by_object[$tabname]->base = $this->systab->base;
} else {
$this->systab->by_object[$tabname]->base = $this->DivListSystem->selectedBase;
$dialog = FALSE;
$hide_apply = $this->dn == "new";
- $hide_apply = ($this->dn == "new") || (preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/",$this->dn));
+ $hide_apply = ($this->dn == "new") || (preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i",$this->dn));
if(is_object($this->systab) && !isset($this->systab->by_object)){
$dialog = TRUE;
$hide_apply = TRUE;