<commit_before><?php
require_once ('session.php');
require_once ('shared.php');
if(isset($_REQUEST['switchApiVersionTo'])){
	$previousVersion = getApiVersion();
	clearSessionCache();
	$_SESSION['location'] = preg_replace("/\d\d?\.\d/",$_REQUEST['switchApiVersionTo'], $_SESSION['location']);
	$_SESSION['wsdl'] = 'soapclient/sforce.' . str_replace('.', '', $_REQUEST['switchApiVersionTo']) . '.partner.wsdl';
	header("Location: $_SERVER[PHP_SELF]?previousVersion=" . $previousVersion);
}

global $mySforceConnection;
if(isset($_REQUEST['previousVersion'])){
	try {
		$mySforceConnection->getServerTimestamp();
	} catch (Exception $e) {
		if(stripos($e->getMessage(),'UNSUPPORTED_API_VERSION') > -1) {
			clearSessionCache();
			$_SESSION['location'] = preg_replace("/\d\d?\.\d/",$_REQUEST['previousVersion'], $_SESSION['location']);
			$_SESSION['wsdl'] = 'soapclient/sforce.' . str_replace('.', '', $_REQUEST['previousVersion']) . '.partner.wsdl';
			header("Location: $_SERVER[PHP_SELF]?UNSUPPORTED_API_VERSION");
		}
		show_error($e->getMessage(),true,true);
		exit;
	}	
}

require_once ('header.php');
?>

<script type="text/javascript" src="script/simpletreemenu.js">
/***********************************************
* Simple Tree Menu - Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<link rel="stylesheet" type="text/css" href="style/simpletree.css" />

<p/>
<form name="changeApiVersionForm" action="<?php $_SERVER['PHP_SELF'] ?>">
	Change API Version: 
	<?php
	print "<select  method='POST' name='switchApiVersionTo' onChange='document.changeApiVersionForm.submit();'>";
	foreach($_GLOBALS['apiVersions'] as $v) {
		print "<option value='$v'";
		if (getApiVersion() == $v) print " selected=\"selected\"";
		print ">" . $v . "</option>";
	}
	print "</select>";
	?>
</form>
<p/>

<?php

if (isset($_REQUEST['UNSUPPORTED_API_VERSION'])) {
	show_error("Selected API version is not supported by this Salesforce organization. Automatically reverted to prior version.",false,false);
}

$sessionInfo = array();
$sessionInfo['Connection'] = array(
	'API Version' => getApiVersion(),
	'Client Id' => isset($_SESSION['tempClientId']) ? $_SESSION['tempClientId'] : $_SESSION['config']['callOptions_client'], 
	'Endpoint' => $mySforceConnection->getLocation(),
	'Session Id' => $mySforceConnection->getSessionId(), 
);

foreach($mySforceConnection->getUserInfo() as $uiKey => $uiValue) {
	if(stripos($uiKey,'org') !== 0) {
		$sessionInfo['User'][$uiKey] = $uiValue;
	} else {
		$sessionInfo['Organization'][$uiKey] = $uiValue;		
	}
}

print "<p/>" .
      "<a href=\"javascript:ddtreemenu.flatten('sessionInfoTree', 'expand')\">Expand All</a> | <a href=\"javascript:ddtreemenu.flatten('sessionInfoTree', 'collapse')\">Collapse All</a>\n" .<commit_msg>right float API version change picklist<commit_after><?php
require_once ('session.php');
require_once ('shared.php');
if(isset($_REQUEST['switchApiVersionTo'])){
	$previousVersion = getApiVersion();
	clearSessionCache();
	$_SESSION['location'] = preg_replace("/\d\d?\.\d/",$_REQUEST['switchApiVersionTo'], $_SESSION['location']);
	$_SESSION['wsdl'] = 'soapclient/sforce.' . str_replace('.', '', $_REQUEST['switchApiVersionTo']) . '.partner.wsdl';
	header("Location: $_SERVER[PHP_SELF]?previousVersion=" . $previousVersion);
}

global $mySforceConnection;
if(isset($_REQUEST['previousVersion'])){
	try {
		$mySforceConnection->getServerTimestamp();
	} catch (Exception $e) {
		if(stripos($e->getMessage(),'UNSUPPORTED_API_VERSION') > -1) {
			clearSessionCache();
			$_SESSION['location'] = preg_replace("/\d\d?\.\d/",$_REQUEST['previousVersion'], $_SESSION['location']);
			$_SESSION['wsdl'] = 'soapclient/sforce.' . str_replace('.', '', $_REQUEST['previousVersion']) . '.partner.wsdl';
			header("Location: $_SERVER[PHP_SELF]?UNSUPPORTED_API_VERSION");
		}
		show_error($e->getMessage(),true,true);
		exit;
	}	
}

require_once ('header.php');
?>

<script type="text/javascript" src="script/simpletreemenu.js">
/***********************************************
* Simple Tree Menu - Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<link rel="stylesheet" type="text/css" href="style/simpletree.css" />

<p/>
<div style='float:right;'>
	<form name="changeApiVersionForm" action="<?php $_SERVER['PHP_SELF'] ?>">
		Change API Version: 
		<?php
		print "<select  method='POST' name='switchApiVersionTo' onChange='document.changeApiVersionForm.submit();'>";
		foreach($_GLOBALS['apiVersions'] as $v) {
			print "<option value='$v'";
			if (getApiVersion() == $v) print " selected=\"selected\"";
			print ">" . $v . "</option>";
		}
		print "</select>";
		?>
	</form>
</div>

<?php

if (isset($_REQUEST['UNSUPPORTED_API_VERSION'])) {
	show_error("Selected API version is not supported by this Salesforce organization. Automatically reverted to prior version.",false,false);
}

$sessionInfo = array();
$sessionInfo['Connection'] = array(
	'API Version' => getApiVersion(),
	'Client Id' => isset($_SESSION['tempClientId']) ? $_SESSION['tempClientId'] : $_SESSION['config']['callOptions_client'], 
	'Endpoint' => $mySforceConnection->getLocation(),
	'Session Id' => $mySforceConnection->getSessionId(), 
);

foreach($mySforceConnection->getUserInfo() as $uiKey => $uiValue) {
	if(stripos($uiKey,'org') !== 0) {
		$sessionInfo['User'][$uiKey] = $uiValue;
	} else {
		$sessionInfo['Organization'][$uiKey] = $uiValue;		
	}
}

print "<p/>" .
      "<a href=\"javascript:ddtreemenu.flatten('sessionInfoTree', 'expand')\">Expand All</a> | <a href=\"javascript:ddtreemenu.flatten('sessionInfoTree', 'collapse')\">Collapse All</a>\n" .
{'fraction_non_alphanumeric': 0.2292403570827017, 'fraction_numerical': 0.00067374094660603, 'mean_word_length': 6.478589420654912, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 66, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1521240', 'n_tokens_mistral': 1935, 'n_tokens_neox': 1880, 'n_words': 341}