Author: jfthomps
Date: Wed Dec  5 22:10:20 2012
New Revision: 1417668

URL: http://svn.apache.org/viewvc?rev=1417668&view=rev
Log:
VCL-626
Name RDP file download after server reservation name

utils.php: modified sendRDPfile - if server reservation, name file based on 
server reservation name; if server and cluster reservation, name file based on 
reservation name and image name

Modified:
    vcl/trunk/web/.ht-inc/utils.php

Modified: vcl/trunk/web/.ht-inc/utils.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/utils.php?rev=1417668&r1=1417667&r2=1417668&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Wed Dec  5 22:10:20 2012
@@ -8460,7 +8460,14 @@ function sendRDPfile() {
        $redirectcomports = $user["mapserial"];
 
        header("Content-type: application/rdp");
-       header("Content-Disposition: inline; 
filename=\"{$res['prettyimage']}.rdp\"");
+       if($request['serverrequest']) {
+               if(count($request['reservations']) == 1)
+                       header("Content-Disposition: inline; 
filename=\"{$request['servername']}.rdp\"");
+               else
+                       header("Content-Disposition: inline; 
filename=\"{$request['servername']}-{$res['prettyimage']}.rdp\"");
+       }
+       else
+               header("Content-Disposition: inline; 
filename=\"{$res['prettyimage']}.rdp\"");
        print "screen mode id:i:$screenmode\r\n";
        print "desktopwidth:i:$width\r\n";
        print "desktopheight:i:$height\r\n";


Reply via email to