summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc5653e)
raw | patch | inline | side by side (parent: cc5653e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 Mar 2010 14:24:15 +0000 (14:24 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 30 Mar 2010 14:24:15 +0000 (14:24 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17402 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/fai/admin/fai/class_faiPackage.inc b/gosa-plugins/fai/admin/fai/class_faiPackage.inc
index 22aa7889fa2c138a38bd57ad50e3ca5a023d9def..71b9770b6e344a0ff339cd68ae152d52fa470578 100644 (file)
/* Get description */
$description = " ";
if(isset($this->list[$usedName]['DESCRIPTION'])){
- $description = postDecode($this->list[$usedName]['DESCRIPTION']);
+ $description = base64_decode($this->list[$usedName]['DESCRIPTION']);
}
if(!preg_match('/^freeze/', $this->FAIstate) && $this->acl_is_writeable("FAIpackage")){
diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
index 2087089f4cebb505e563a1c75d0caf8efca43b1a..fe760476c7cd174aaef0c80b324718e3752b3b29 100644 (file)
/* 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 */
diff --git a/gosa-plugins/fai/admin/fai/class_faiScript.inc b/gosa-plugins/fai/admin/fai/class_faiScript.inc
index 750d1d77c4a4ac322fa976f7c1b2dc5cca48d597..a311eb1403c989759c0170b545230e91fa02bfda 100644 (file)
/* 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 */
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();
diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplate.inc b/gosa-plugins/fai/admin/fai/class_faiTemplate.inc
index 1a46f050dfc4b5da18688fe81a6e710593be9ca4..3821653247ec78f57fff78d5dbcd452b3a8a6f27 100644 (file)
if(preg_match("/^editscript_/",$name)&&($once)){
$once = false;
$entry = preg_replace("/^editscript_/","",$name);
- $entry = base64_decode(preg_replace("/_.*/","",$entry));
+ $entry = postDecode(preg_replace("/^editscript_/","",$name));
$obj = $this->SubObjects[$entry];
$acl_dn = $this->acl_base_for_current_object($obj['dn']);
if(preg_match("/^deletescript_/",$name)&&($once) && !preg_match("/freeze/",$this->FAIstate)){
$once = false;
$entry = preg_replace("/^deletescript_/","",$name);
- $entry = base64_decode(preg_replace("/_.*/","",$entry));
+ $entry = postDecode(preg_replace("/^deletescript_/","",$name));
$obj = $this->SubObjects[$entry];
$acl_dn = $this->acl_base_for_current_object($obj['dn']);
}
}
}
- }
- /* File download requested */
- if(isset($_GET['getFAItemplate'])){
- if(isset($this->SubObjects[$_GET['getFAItemplate']])){
- $obj = $this->SubObjects[$_GET['getFAItemplate']];
+ if(preg_match("/^download_/",$name)&&($once) && !preg_match("/freeze/",$this->FAIstate)){
+ $once = false;
+ $entry = postDecode(preg_replace("/^download_/","",$name));
+ $obj = $this->SubObjects[$entry];
$obj = $this->get_object_attributes($obj,$this->sub_Load_Later);
- send_binary_content($obj['FAItemplateFile'],$obj['cn'].".FAItemplate");
- }
+ if(!isset($obj['cn'])){
+ trigger_error("Something wen't wrong here!");
+ }else{
+ send_binary_content($obj['FAItemplateFile'],$obj['cn'].".FAItemplate");
+ }
+ }
}
/* Edit entries via GET */
/* Hide delete icon if this object is freezed */
if(preg_match("/freeze/",$this->FAIstate)){
- $act .= "<input type='image' src='images/lists/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
+ $act .= image('images/lists/edit.png','editscript_%s', msgPool::editButton());
}else{
- $act .= "<input type='image' src='images/lists/edit.png' name='editscript_%s' title='"._("edit")."' alt='"._("edit")."'>";
+ $act .= image('images/lists/edit.png','editscript_%s', msgPool::editButton());
if(preg_match("/d/",$acl)){
- $act .="<input type='image' src='images/lists/trash.png' name='deletescript_%s' title='"._("delete")."' alt='"._("delete")."'>";
+ $act .= image('images/lists/trash.png','deletescript_%s', msgPool::delButton());
}
}
if(($this->SubObjects[$key]['status'] == "new") || ($this->SubObjects[$key]['dn'] == "new") || !preg_match("/r/",$s_acl)){
$down = "";
}else{
- $down = "<a href='?plug=".$_GET['plug']."&getFAItemplate=".$key."'>
- <img src='images/save.png' alt='"._("Download")."' title='"._("Download")."' border=0>
- </a>";
+ $down = image('images/save.png','download_'.postEncode($key), _("Download"));
}
/* Check if we are allowed to view this object */
$edit_link = "<a href='?plug=".$_GET['plug']."&act=edit&id=".$key."'>".$tmp[$key]."</a>";
$divlist->AddEntry(array( array("string"=> $edit_link),
array("string"=>$down , "attach" => "style='width:20px;'"),
- array("string"=>str_replace("%s",base64_encode($key),$act),
+ array("string"=>str_replace("%s",postEncode($key),$act),
"attach"=>"style='border-right: 0px;width:50px;text-align:right;'")));
}
}