summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 38028cb)
raw | patch | inline | side by side (parent: 38028cb)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Oct 2005 12:24:52 +0000 (12:24 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Oct 2005 12:24:52 +0000 (12:24 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1468 594d385d-05f5-0310-b6e9-bd551577e9d8
index b6fc7df0e4c76a4fad4daee0f1e4ce155e72867b..e90e7e9b285c50af39b682dbbe92735117e93141 100644 (file)
$a_return=array();
foreach($this->SubObjects as $obj){
if($obj['status'] != "delete"){
+
+ if((isset($obj['description']))&&(!empty($obj['description']))){
if (preg_match("/\[\*\]/", $obj['description'])){
$a_return[$obj['cn']]= $obj['cn']." [".preg_replace("/\s*\[\*\]\s*/", "", $obj['description'])."]";
} else {
$a_return[$obj['cn']]= $obj['cn']."=".$obj['FAIvariableContent']." [".$obj['description']."]";
}
+ }else{
+ if (preg_match("/\[\*\]/", $obj['description'])){
+ $a_return[$obj['cn']]= $obj['cn'];
+ } else {
+ $a_return[$obj['cn']]= $obj['cn']."=".$obj['FAIvariableContent'];
+ }
+ }
}
}
return($a_return);
{
$message= array();
$str = utf8_encode("üöä");
- if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description))){
+ if(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description)){
$message[]=_("Please enter a valid description.");
}
return ($message);
$ldap->modify($tmp);
$this->handle_post_events("modify");
}elseif($obj['status']=="new"){
+
+ if($tmp['description'] == array()){
+ unset($tmp['description']);
+ }
+
$ldap->cd(preg_replace('/^[^,]+,[^,]+,/', '', $sub_dn));
$ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $sub_dn));
$ldap->cd($sub_dn);
diff --git a/plugins/admin/fai/class_faiVariableEntry.inc b/plugins/admin/fai/class_faiVariableEntry.inc
index d3a19ebbe5d01662672a429d3b9daa4bb466979c..e972c420d8b2f405aebf6e7e5388e0a932866c2e 100644 (file)
$message[]=_("Please specify a value for the attribute 'content'.");
}
- if(empty($this->Object_description)){
- $message[] = _("Please enter a description.");
- }
-
if(empty($this->Object_cn)){
$message[] = _("Please enter a name.");
}
index 25843553c434e09b4330d44e9d2d9d1ff44694ea..066e2e897e7bc06041dd1d5003ab53cf06fd39cb 100644 (file)
<tr>
<td>
<LABEL for="cn">
- {t}Name{/t}
+ {t}Name{/t}{$must}
</LABEL>
</td>
<td>
<tr>
<td>
<LABEL for="description">
- {t}Description{/t}{$must}
+ {t}Description{/t}
</LABEL>
</td>
<td>
index 655dd5d0b2fbf309b62251c7f6b95a054e750784..e1373771e5ac86f3806d7a14e1aad21f9fe8806f 100644 (file)
</tr>
<tr>
<td>
- {t}Description{/t}{$must}
+ {t}Description{/t}
</td>
<td>
<input size=40 value="{$Object_description}" name="Object_description">