Code

KisokProfile will be saved as url now
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Nov 2005 06:59:11 +0000 (06:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Nov 2005 06:59:11 +0000 (06:59 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1897 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_kioskManagementDialog.inc
plugins/personal/environment/environment.tpl

index 6a12c637a8d7eb79ee572a9236601cd59630ec3c..4ae176f3ef2d5cc67d84b123f9c20fe8b47bb4ad 100644 (file)
@@ -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'];
       }
     }
 
index 692606cfca7a828e823cc3b8b145e7b5c1a4e424..05786327bab3fee0ad63bdfe6987ffeb8b26723a 100644 (file)
@@ -55,7 +55,7 @@
                                        </td>
                                        <td>
                                                <select name="gotoKioskProfile" {$gotoKioskProfileACL} id="gotoKioskProfile">
-                        {html_options values=$gotoKioskProfiles output=$gotoKioskProfiles selected=$gotoKioskProfile}
+                        {html_options values=$gotoKioskProfileKeys output=$gotoKioskProfiles selected=$gotoKioskProfile}
                         <option disabled>&nbsp;</option></select>&nbsp;
                                                <input type="submit" name="KioskManagementDialog" value="{t}Manage{/t}" {$gotoKioskProfileACL}>
                                        </td>