diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc
index 0d4d5ea88d2369037dee56ada7f2ab7def015a83..c483bb97d3e71f8fb6338caed3e79767b3e5e848 100644 (file)
return ($display);
}
- $_SESSION['binary'] = $this->gotoLogonScript;
- $_SESSION['binarytype'] = "octet-stream";
- $_SESSION['binaryfile'] = $this->cn.".gosaApplication";
+ /* Download requested */
+ foreach($_POST as $name => $value){
+ if(preg_match("/^downloadScript/",$name)){
+ $_SESSION['binary'] = $this->gotoLogonScript;
+ $_SESSION['binarytype'] = "octet-stream";
+ $_SESSION['binaryfile'] = $this->cn.".gosaApplication";
+ header("location: getbin.php ");
+ exit();
+ }
+ }
+
+ /* Reassign picture data, sometimes its corrupt cause we started a download of application scripts */
+ $_SESSION['binary'] = $this->iconData;
+ $_SESSION['binarytype'] = "image/jpeg";
+
$smarty->assign("rand", rand(0, 10000));
$head = $this->generateTemplate();
$this->gotoLogonScript= $this->generateTemplate().preg_replace('/.*### END HEADER ###/s', '', $this->gotoLogonScript);
"gosaApplicationIcon" => _("Icon"),
"gosaApplicationFlags" => _("Flag"),
"gotoLogonScript" => _("Script content"),
- "gosaApplicationParameter"=> _("Application parameter"),
"exec_for_groupmembers" => _("Only executable for members"), // G
"place_on_desktop" => _("Place icon on members desktop"), // D