summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 59d127b)
raw | patch | inline | side by side (parent: 59d127b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Aug 2008 10:12:12 +0000 (10:12 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Aug 2008 10:12:12 +0000 (10:12 +0000) |
- Fixed empty() checks
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12207 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12207 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc | patch | blob | history | |
gosa-plugins/systems/admin/systems/class_componentGeneric.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 2463ed87b6f505fc9ad59337e639be90d8a22a41..702212d4d1cebea43bc2fa6cdc349d41e3bd56ef 100644 (file)
/* If this is a WS / Terminal depending printer, display account state button */
if(!preg_match("/^Printer$/i",$this->BelongsTo)){
- if((empty($this->cn)) && ($this->dn != "new")){
+ if($this->cn == "" && ($this->dn != "new")){
$display= $this->show_enable_header(_("Add printer extension"),
msgPool::featuresDisabled(_("printer"))._("You can't enable it while 'cn' is not present in entry. Possibly you are currently creating a new terminal template."),TRUE,TRUE);
$this->is_account= false;
$dn= "cn=".$this->cn.get_ou('printerou').",".$this->base;
/* must: cn */
- if(($this->BelongsTo == "Printer") && (empty($this->cn))){
+ if(($this->BelongsTo == "Printer") && $this->cn == ""){
$message[]= msgPool::required(_("Name"));
}
/* Remove empty values */
foreach($this->attrs as $name => $value){
- if(empty($value)){
+ $value = trim($value);
+ if($value == ""){
unset($this->attrs[$name]);
}
}
diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc
index 002b38b2eb4c3fe12d580b6c3e15e2b56c079d73..294e9a0ede38867d304d63b9f602128ded60f153 100644 (file)
if(preg_match("/cn=dhcp,/",$attrs['dn'])){
continue;
}
- if ($attrs['dn'] != $this->orig_dn){
+ if ($attrs['dn'] != $this->orig_dn && preg_match("/".normalizePreg(get_ou("componentou"))."/",$attrs['dn'])){
$message[]= msgPool::duplicated(_("Component name"));
break;
}