diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc
index e29091b92866e03354e2a5501708decc0537f2cf..2703ae7219a1bc6b6f793396f920c84f7922642e 100644 (file)
$this->scriptListWidget->setInstantDelete(false);
$this->scriptListWidget->setEditable(true);
$this->scriptListWidget->setWidth("100%");
$this->scriptListWidget->setInstantDelete(false);
$this->scriptListWidget->setEditable(true);
$this->scriptListWidget->setWidth("100%");
- $this->scriptListWidget->setHeight("70px");
+ $this->scriptListWidget->setHeight("140px");
$this->scriptListWidget->setHeader(array(_("Name"),_("Description")));
}
$this->scriptListWidget->setHeader(array(_("Name"),_("Description")));
}
+
function convertList($type = FALSE)
{
$data = array();
function convertList($type = FALSE)
{
$data = array();
+ $s_acl = $this->ui->get_permissions($this->dn,"fai/faiScriptEntry","FAIscript");
foreach($this->SubObjects as $cn => $entry){
if($entry['status'] == "delete") continue;
if($type){
$data[$cn] = $entry;
}else{
foreach($this->SubObjects as $cn => $entry){
if($entry['status'] == "delete") continue;
if($type){
$data[$cn] = $entry;
}else{
+ if(!isset($entry['description'])) $entry['description']="";
$data[$cn] = array('data' => array($entry['cn'], $entry['description']));
}
}
$data[$cn] = array('data' => array($entry['cn'], $entry['description']));
}
}
/* Check if we must decode some attributes */
if(in_array_ics($attrs,$this->sub64coded)){
/* Check if we must decode some attributes */
if(in_array_ics($attrs,$this->sub64coded)){
- $var = postDecode($var);
+ $var = base64_decode($var);
}
/* check if this is a binary entry */
}
/* check if this is a binary entry */
set_object_info($this->dn);
}
set_object_info($this->dn);
}
- /* Handle posts */
- $s_action = $s_entry = "";
- foreach($_POST as $name => $value){
- if(preg_match("/^download_/",$name)){
- $s_entry = postDecode(preg_replace("/^download_/","",$name));
- $obj = $this->SubObjects[$s_entry];
- $obj = $this->get_object_attributes($obj,$this->sub_Load_Later);
- send_binary_content(stripslashes($obj['FAIscript']),$obj['cn'].".FAIscript");
- break;
- }
- }
-
$this->scriptListWidget->setAcl($this->getacl(""));
$this->scriptListWidget->save_object();
$action = $this->scriptListWidget->getAction();
$this->scriptListWidget->setAcl($this->getacl(""));
$this->scriptListWidget->save_object();
$action = $this->scriptListWidget->getAction();
$this->scriptListWidget->setListData($this->convertList(TRUE), $this->convertList());
$this->scriptListWidget->update();
$this->scriptListWidget->setListData($this->convertList(TRUE), $this->convertList());
$this->scriptListWidget->update();
- $smarty->assign("Entry_divlist",$this->scriptListWidget->render());
+ $smarty->assign("Entry_listing",$this->scriptListWidget->render());
/* Magic quotes GPC, escapes every ' " \, to solve some security risks
* If we post the escaped strings they will be escaped again
/* Magic quotes GPC, escapes every ' " \, to solve some security risks
* If we post the escaped strings they will be escaped again
foreach($Objects as $name => $obj){
foreach($this->sub64coded as $codeIt){
foreach($Objects as $name => $obj){
foreach($this->sub64coded as $codeIt){
- $obj[$codeIt]=postEncode(stripslashes($obj[$codeIt]));
+ $obj[$codeIt]=base64_encode(stripslashes($obj[$codeIt]));
}
$tmp = array();
}
$tmp = array();