diff --git a/plugins/admin/applications/class_applicationGeneric.inc b/plugins/admin/applications/class_applicationGeneric.inc
index 2f32485b300670839c7e3540ba813e23cfb25980..0918b0f031cf82a4d098f4af11b6e6eea0b153f1 100644 (file)
return ($display);
}
-# if(isset($_POST['ScriptTemplate'])){
- $head = $this->generateTemplate();
- $scr = $this->gotoLogonScript;
-
- if(preg_match("/### END HEADER ###/",$scr)){
- $pos = strrpos($scr,"### END HEADER ###");
- $pos = $pos + strlen("### END HEADER ###");
- $scr=substr($scr,$pos,(strlen($scr)));
- }
-
- $this->gotoLogonScript = $head.$scr;
-# }
+ $head = $this->generateTemplate();
+ $this->gotoLogonScript= $this->generateTemplate().preg_replace('/.*### END HEADER ###/s', '', $this->gotoLogonScript);
if((isset($_POST['upLoad']))&&(isset($_FILES['ScriptFile']))){
$str = file_get_contents($_FILES['ScriptFile']['tmp_name']);
/* Checkboxes */
foreach (array("G" => "exec_for_groupmembers", "O" => "overwrite_config",
+ "L" => "place_on_kicker",
"D" => "place_on_desktop", "M" => "place_in_startmenu") as $key => $val){
if (preg_match("/$key/", $this->gosaApplicationFlags)){
$smarty->assign("$val", "checked");
if (isset($_POST['place_on_desktop']) && $_POST['place_on_desktop'] == 1){
$flag.= "D";
}
+ if (isset($_POST['place_on_kicker']) && $_POST['place_on_kicker'] == 1){
+ $flag.= "L";
+ }
if (isset($_POST['place_in_startmenu']) && $_POST['place_in_startmenu'] == 1){
$flag.= "M";
}
/* Check for existing application */
$ldap= $this->config->get_ldap_link();
$ldap->cd($this->config->current["BASE"]);
- $ldap->search("(&(objectClass=gosaApplication)(cn=$this->cn))");
+ $ldap->search("(&(objectClass=gosaApplication)(cn=$this->cn))",array("cn"));
$ldap->fetch();
if ($ldap->count() != 0 && $this->dn == "new"){
$message[]= _("There's already an application with this 'Name'.");