summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d96d623)
raw | patch | inline | side by side (parent: d96d623)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 31 Aug 2006 11:33:24 +0000 (11:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 31 Aug 2006 11:33:24 +0000 (11:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4559 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_kioskManagementDialog.inc | patch | blob | history |
diff --git a/plugins/personal/environment/class_kioskManagementDialog.inc b/plugins/personal/environment/class_kioskManagementDialog.inc
index 98bcffc70cc6dedd5da5771fea4b795c336389c6..1a126d9b4e030e7f3f96c966f8996706634d8e83 100644 (file)
$this->filesToAttach[$file['name']]['contents'] = file_get_contents($file['tmp_name']);
}
}
-
+
$only_once = true;
foreach($_POST as $name => $value){
-
+
if((preg_match("/^delkiosk_/",$name))&&($only_once)){
$only_once = false;
$id = preg_replace("/^delkiosk_/","",$name);
$id = preg_replace("/_.*$/","",$id);
- $filename = $this->baseDir."/".preg_replace("/^.*\//i","",base64_decode($id));
+ $name = preg_replace("/^.*\//i","",base64_decode($id));
- $res = unlink($filename);
- if(!$res){
- if(!is_writeable($filename)){
- print_red(sprintf(_("Can't delete '%s'. Error was: permission denied."), $filename));
- }
- if(!file_exists($filename)){
- print_red(sprintf(_("Can't delete '%s'. Errow was: file doesn't exist."), $filename));
+ $filename = $this->baseDir."/".$name;
+
+ if(isset($this->filesToAttach[$name])){
+ unset($this->filesToAttach[$name]);
+ }else{
+
+ $res = @unlink($filename);
+ if(!$res){
+ if(!is_writeable($filename)){
+ print_red(sprintf(_("Can't delete '%s'. Error was: permission denied."), $filename));
+ }
+ if(!file_exists($filename)){
+ print_red(sprintf(_("Can't delete '%s'. Errow was: file doesn't exist."), $filename));
+ }
}
}
}
}
-
+
/* Delete profile
* Delete selected file form $this->baseDir
*/