summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8b1c208)
raw | patch | inline | side by side (parent: 8b1c208)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 Jan 2006 08:54:21 +0000 (08:54 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 Jan 2006 08:54:21 +0000 (08:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2516 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_glpiAttachmentPool.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_glpiAttachmentPool.inc b/plugins/admin/systems/class_glpiAttachmentPool.inc
index 6ee839e4abc603e889f9d52dea4aa732b3286455..3a8c3d9dede3074df5509ad320863d2ed430a7ff 100644 (file)
$att = $this->parent->handle->getAttachments();
$ok = true;
$this->name=trim($this->name);
+
foreach($att as $val){
- if($val['name'] == $this->name){
- $ok = false;
+ if(!isset($this->entry['ID'])){
+ if($val['name'] == $this->name){
+ $ok = false;
+ }
+ }else{
+ if(($val['name'] == $this->name)&&($this->entry['ID'] != $val['ID'])){
+ $ok = false;
+ }
}
}
if(!$ok){