vcl-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arku...@apache.org
Subject svn commit: r1788286 - /vcl/trunk/web/.ht-inc/utils.php
Date Thu, 23 Mar 2017 16:45:10 GMT
Author: arkurth
Date: Thu Mar 23 16:45:10 2017
New Revision: 1788286

URL: http://svn.apache.org/viewvc?rev=1788286&view=rev
Log:
VCL-959
Changed value of winposstr that gets added to the .rdp files so that when launching the file,
the RDP window is opened with the maximum extents. The previous settings caused the window
to open with scrollbars and the remote desktop partially hidden.

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=1788286&r1=1788285&r2=1788286&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/utils.php (original)
+++ vcl/trunk/web/.ht-inc/utils.php Thu Mar 23 16:45:10 2017
@@ -1649,19 +1649,19 @@ function getImageConnectMethods($imageid
 		       . "SELECT DISTINCT i.id, "
 		       .                 "ir.id, "
 		       .                 "c.id, "
-		       .                 "c.description, "
+		      .                  "c.description, "
 		       .                 "cm.disabled "
-		       . "FROM image i "
-		       . "LEFT JOIN OS o ON (o.id = i.OSid) "
-		       . "LEFT JOIN OStype ot ON (ot.name = o.type) "
-		       . "LEFT JOIN imagerevision ir ON (ir.imageid = i.id) "
+		      . "FROM image i "
+		      . "LEFT JOIN OS o ON (o.id = i.OSid) "
+		      . "LEFT JOIN OStype ot ON (ot.name = o.type) "
+		      . "LEFT JOIN imagerevision ir ON (ir.imageid = i.id) "
 		       . "LEFT JOIN connectmethodmap cm ON (%s) "
-		       . "LEFT JOIN connectmethod c ON (cm.connectmethodid = c.id) "
-		       . "WHERE cm.autoprovisioned IS NULL "
+		      . "LEFT JOIN connectmethod c ON (cm.connectmethodid = c.id) "
+		      . "WHERE cm.autoprovisioned IS NULL  "
 		       . "HAVING c.id IS NOT NULL "
-		       . "ORDER BY i.id, "
-		       .          "cm.disabled, "
-		       .          "c.description";
+		      . "ORDER BY i.id, "
+		      .          "cm.disabled, "
+		      .          "c.description";
 		$query = sprintf($qbase, "cm.OStypeid = ot.id");
 		doQuery($query);
 		$query = sprintf($qbase, "cm.OSid = o.id");
@@ -2569,9 +2569,9 @@ function encryptData($data) {
 	if(! $data)
 		return false;
 	if(! function_exists('openssl_encrypt')) {
-		$aes = new Crypt_AES();
-		$aes->setKey($cryptkey);
-		$cryptdata = $aes->encrypt($data);
+	$aes = new Crypt_AES();
+	$aes->setKey($cryptkey);
+	$cryptdata = $aes->encrypt($data);
 	}
 	else {
 		static $key;
@@ -2600,9 +2600,9 @@ function decryptData($data) {
 		return false;
 	$cryptdata = base64_decode($data);
 	if(! function_exists('openssl_encrypt')) {
-		$aes = new Crypt_AES();
-		$aes->setKey($cryptkey);
-		$decryptdata = $aes->decrypt($cryptdata);
+	$aes = new Crypt_AES();
+	$aes->setKey($cryptkey);
+	$decryptdata = $aes->decrypt($cryptdata);
 	}
 	else {
 		static $key;
@@ -2973,7 +2973,7 @@ function getResourceGroupMemberships($ty
 		$qh = doQuery($query, 282);
 		while($row = mysql_fetch_assoc($qh))
 			$return[$type][$row["id"]][] = $row["groupid"];
-	}
+			}
 	return $return;
 }
 
@@ -4325,7 +4325,7 @@ function isAvailable($images, $imageid,
 				if($debug) {
 					$cnt = count($resources['computer']);
 					print "console.log('computers available to user: $cnt');";
-				}
+			}
 			}
 			$alloccompids = implode(",", $allocatedcompids);
 
@@ -7545,7 +7545,7 @@ function showTimeTable($links) {
 			if(array_key_exists('tzoffset', $_SESSION['persistdata']))
 				$label = date('n/d/Y+g:i+a', $stamp + $_SESSION['persistdata']['tzoffset'] * 60);
 			else
-				$label = date('n/d/Y+g:i+a', $stamp);
+			$label = date('n/d/Y+g:i+a', $stamp);
 			$label = str_replace('+', ' ', $label);
 			$yesterday = $stampArr["mday"];
 		}
@@ -7553,7 +7553,7 @@ function showTimeTable($links) {
 			if(array_key_exists('tzoffset', $_SESSION['persistdata']))
 				$label = date('g:i a', $stamp + $_SESSION['persistdata']['tzoffset'] * 60);
 			else
-				$label = date('g:i a', $stamp);
+			$label = date('g:i a', $stamp);
 		}
 		print "          <TH align=right>$label</TH>\n";
 		$free = 0;
@@ -9939,7 +9939,15 @@ function sendRDPfile() {
 	print "desktopwidth:i:$width\r\n";
 	print "desktopheight:i:$height\r\n";
 	print "session bpp:i:$bpp\r\n";
-	print "winposstr:s:0,1,382,71,1182,671\r\n";
+	
+	print "winposstr:s:0,1,0,0,5000,4000\r\n";
+	# 0: 
+	# 1:    use coordinates for the window position, as opposed to 3 - maximized
+	# 0:    left position in client coordinates
+	# 0:    top position in client coordinates
+	# 5000: width in pixels - set large to avoid scrollbars
+	# 4000: height in pixels - set large to avoid scrollbars
+	
 	print "full address:s:$ipaddress$port\r\n";
 	print "compression:i:1\r\n";
 	print "keyboardhook:i:2\r\n";
@@ -13688,9 +13696,9 @@ function printHTMLFooter() {
 function changeLocale() {
 	global $locale, $authed, $authMechs;
 	if($authed) {
-		$newlocale = getContinuationVar('locale');
-		$oldmode = getContinuationVar('oldmode');
-		$authtype = getContinuationVar('authtype', '');
+	$newlocale = getContinuationVar('locale');
+	$oldmode = getContinuationVar('oldmode');
+	$authtype = getContinuationVar('authtype', '');
 	}
 	else {
 		$newlocale = processInputVar('locale', ARG_STRING);
@@ -13792,23 +13800,23 @@ function getSelectLanguagePulldown() {
 	$rt  = "<form name=\"localeform\" class=\"localeform\" action=\"" . BASEURL . SCRIPT
. "\" method=post>\n";
 	if($authed) {
 		$rt .= "<select name=\"continuation\" onChange=\"this.form.submit();\" autocomplete=\"off\">\n";
-		$cdata = array('IP' => $remoteIP, 'oldmode' => $mode);
-		if($mode == 'selectauth') {
-			$type = processInputVar('authtype', ARG_STRING);
-			if(! empty($type) && array_key_exists($type, $authMechs))
-				$cdata['authtype'] = $type;
-		}
-		foreach($locales as $dir => $lang) {
-			$cdata['locale'] = $dir;
-			$tmp = explode('/', $dir);
-			$testlocale = array_pop($tmp);
-			$cont = addContinuationsEntry('changeLocale', $cdata, 86400);
-			if($locale == $testlocale)
-				$rt .= "<option value=\"$cont\" selected>{$lang}</option>\n";
-			else
-				$rt .= "<option value=\"$cont\">{$lang}</option>\n";
-		}
-		$rt .= "</select>\n";
+	$cdata = array('IP' => $remoteIP, 'oldmode' => $mode);
+	if($mode == 'selectauth') {
+		$type = processInputVar('authtype', ARG_STRING);
+		if(! empty($type) && array_key_exists($type, $authMechs))
+			$cdata['authtype'] = $type;
+	}
+	foreach($locales as $dir => $lang) {
+		$cdata['locale'] = $dir;
+		$tmp = explode('/', $dir);
+		$testlocale = array_pop($tmp);
+		$cont = addContinuationsEntry('changeLocale', $cdata, 86400);
+		if($locale == $testlocale)
+			$rt .= "<option value=\"$cont\" selected>{$lang}</option>\n";
+		else
+			$rt .= "<option value=\"$cont\">{$lang}</option>\n";
+	}
+	$rt .= "</select>\n";
 	}
 	else {
 		$rt .= "<select name=\"locale\" onChange=\"this.form.submit();\" autocomplete=\"off\">\n";



Mime
View raw message