summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 921661a)
raw | patch | inline | side by side (parent: 921661a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 Apr 2006 13:10:32 +0000 (13:10 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 18 Apr 2006 13:10:32 +0000 (13:10 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3052 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/class_faiTemplateEntry.inc | patch | blob | history | |
plugins/admin/fai/faiTemplateEntry.tpl | patch | blob | history |
diff --git a/plugins/admin/fai/class_faiTemplateEntry.inc b/plugins/admin/fai/class_faiTemplateEntry.inc
index b387581e79768eed81e4311c7ce6be97361d0789..9fec3e07b879fcd8ca7109f37a681acba53b1daa 100644 (file)
$this->FAItemplateFile = $str;
/* If we don't have a filename set it from upload filename. */
- if( 0 == strlen( $this->FAItemplatePath ) )
+ if( 0 == strlen( $this->FAItemplatePath )){
$this->FAItemplatePath = $_FILES['FAItemplateFile']['name'];
+ }
+
+ $_SESSION['binary'] = $this->FAItemplateFile;
+ $_SESSION['binarytype'] = 'octet-stream';
+ $_SESSION['binaryfile'] = basename( $this->FAItemplatePath );
}
-
}
$status= _("no file uploaded yet");
+
+ $bStatus = false; // Hide download icon on default
+
if(strlen($this->FAItemplateFile)){
$status= sprintf(_("exists in database (size: %s bytes)"),strlen($this->FAItemplateFile));
+ $bStatus = true; // Display download icon
}
$smarty->assign("status",$status);
+ $smarty->assign("bStatus",$bStatus);
/* Magic quotes GPC, escapes every ' " \, to solve some security risks
* If we post the escaped strings they will be escaped again
index 1aa04a261967ff83e618c9df86bf1d3cbd4cd848..211e15f00aad2521ff807f97776d9277948c8d1b 100644 (file)
</td>
<td style="vertical-align:top">
{$status}
- {if $FAItemplatePath}
+ {if $bStatus}
<a href="getbin.php?rand={$rand}"><img class="middle" alt="{t}Save template{/t}..." title="{t}Save template{/t}..." src="images/save.png" border="0" /></a>
{/if}
<br>