summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 719573b)
raw | patch | inline | side by side (parent: 719573b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Nov 2008 09:26:35 +0000 (09:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 5 Nov 2008 09:26:35 +0000 (09:26 +0000) |
-Only update filename if it is empty and keep path.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12919 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12919 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc
index 7ecd486cf7a9cafb30475adef6e83450ea19503b..27de8a512c2b5c43a0074222feffcc8b90d9693e 100644 (file)
$this->FAItemplateFile = $str;
/* If we don't have a filename set it from upload filename. */
- if( 0 == strlen( $this->FAItemplatePath )){
- $this->FAItemplatePath = $_FILES['FAItemplateFile']['name'];
+ if( 0 == strlen(preg_replace("/^.*\//","",$this->FAItemplatePath))){
+ $this->FAItemplatePath = preg_replace("/[^\/]*$/","",$this->FAItemplatePath).$_FILES['FAItemplateFile']['name'];
}
session::set('binary',$this->FAItemplateFile);