From b47e96f560dea07c8da8470d0304142034c60ed2 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 10 Nov 2005 06:59:11 +0000 Subject: [PATCH] KisokProfile will be saved as url now git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1897 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_kioskManagementDialog.inc | 21 ++++++++++++++++--- plugins/personal/environment/environment.tpl | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/plugins/personal/environment/class_kioskManagementDialog.inc b/plugins/personal/environment/class_kioskManagementDialog.inc index 6a12c637a..4ae176f3e 100644 --- a/plugins/personal/environment/class_kioskManagementDialog.inc +++ b/plugins/personal/environment/class_kioskManagementDialog.inc @@ -85,6 +85,14 @@ class kioskManagementDialog extends plugin return ($a_return); } + if(preg_match("/https/i",$_SERVER['HTTP_REFERER'])){ + $method="https://"; + }else{ + $method="http://"; + } + + $str = $method.$_SERVER['SERVER_NAME']."/kioskProfiles/"; + $dir = @opendir($this->baseDir); if(!$dir){ print_red(sprintf(_("Kiosk path '%s' is not accessible. Please check the permissions."),$this->baseDir)); @@ -93,18 +101,25 @@ class kioskManagementDialog extends plugin while($file = readdir($dir)){ if(!(($file==".")||($file==".."))){ $name = $file; - $a_return[$name] = $name; + $a_return[$str.$name] = $name; } } } + if(preg_match("/https/i",$_SERVER['HTTP_REFERER'])){ + $method="https://"; + }else{ + $method="http://"; + } + + $str = $method.$_SERVER['SERVER_NAME']."/kioskProfiles/"; foreach($this->filesToAttach as $file){ - $a_return[$file['name']] = $file['name']; + $a_return[$str.$file['name']] = $file['name']; } if($attach){ foreach($attach as $file){ - $a_return[$file['name']] = $file['name']; + $a_return[$str.$file['name']] = $file['name']; } } diff --git a/plugins/personal/environment/environment.tpl b/plugins/personal/environment/environment.tpl index 692606cfc..05786327b 100644 --- a/plugins/personal/environment/environment.tpl +++ b/plugins/personal/environment/environment.tpl @@ -55,7 +55,7 @@   -- 2.30.2