</span> </form> <br/> <?php if (WorkbenchContext::get()->getDefaultObject()) { $describeSObjectResult = WorkbenchContext::get()->describeSObjects(WorkbenchContext::get()->getDefaultObject()); $alwaysArrayChildren = array("recordTypeInfos", "childRelationships"); foreach ($alwaysArrayChildren as $child) { if (isset($describeSObjectResult->{$child}) && !is_array($describeSObjectResult->{$child})) { $describeSObjectResult->{$child} = array($describeSObjectResult->{$child}); } } $forceCollapse = WorkbenchContext::get()->hasDefaultObjectChanged(); $processedResults = ExpandableTree::processResults($describeSObjectResult, "Attributes", true); ?> <div class="legend"> <strong>Legend:</strong> <ul> <li class="trueColor">True</li> <li class="falseColor">False</li> <li class="highlightCustomField">Custom Field</li> <li class="highlightSystemField">System Field</li> </ul> </div> <?php $tree = new ExpandableTree("describeTree", $processedResults); $tree->setForceCollapse($forceCollapse); $tree->setAdditionalMenus(ExpandableTree::getClearCacheMenu()); $tree->printTree();
$zipLink = null; if (isset($results->zipFile) || isset($results->retrieveResult->zipFile)) { if (isset($results->zipFile)) { $_SESSION['retrievedZips'][$asyncResults->id] = $results->zipFile; unset($results->zipFile); } else { if (isset($results->retrieveResult->zipFile)) { $_SESSION['retrievedZips'][$asyncResults->id] = $results->retrieveResult->zipFile; unset($results->retrieveResult->zipFile); } } displayInfo("Retrieve result ZIP file is ready for download."); print "<p/>"; $zipLink = " | <a id='zipLink' href='?asyncProcessId={$asyncResults->id}&downloadZip' onclick='undownloadedZip=false;' style='text-decoration:none;'>" . "<span style='text-decoration:underline;'>Download ZIP File</span> <img src='" . getPathToStaticResource('/images/downloadIconCompleted.gif') . "' border='0'/>" . "</a></p>"; } $tree = new ExpandableTree("metadataStatusResultsTree", ExpandableTree::processResults($results)); $tree->setForceCollapse(true); $tree->setAdditionalMenus($zipLink); $tree->setContainsIds(true); $tree->setContainsDates(true); $tree->printTree(); if (isset($debugInfo["DebuggingInfo"]->debugLog)) { print "<p> </p><h3>Debug Logs</h3>"; print "<pre>" . addLinksToIds(htmlspecialchars($debugInfo["DebuggingInfo"]->debugLog, ENT_QUOTES)) . '</pre>'; } // if metadata changes were deployed, clear the cache because describe results will probably be different if ($operation == "D") { WorkbenchContext::get()->clearCache(); } } } catch (Exception $e) {
foreach (explodeCommaSeparated(htmlspecialchars($_POST['packageNames'])) as $p) { if ($p == "unpackaged") { throw new WorkbenchHandledException("Cannot retrieve a package named 'unpackaged' -- to retrieve metadata not in a package, upload an unpackaged manifest file (i.e. 'package.xml')."); } $encodedPackageNames[] = urlencode($p); } $retrieveRequest->packageNames = $encodedPackageNames; } $retrieveRequestId = "RR-" . time(); $_SESSION[$retrieveRequestId] = $retrieveRequest; require_once 'header.php'; displayInfo("Successfully staged retrieve request."); ?> <p class='instructions'>Confirm the following retrieve request:</p> <?php $tree = new ExpandableTree("retrieveRequestTree", ExpandableTree::processResults($_SESSION[$retrieveRequestId])); $tree->setForceCollapse(true); $tree->printTree(); ?> <form id='retrieveForm' name='retrieveForm' method='POST' action=''><input type='hidden' name='retrieveRequestId' value='<?php print $retrieveRequestId; ?> ' /> <input type='submit' name='retrievalConfirmed' value='Retrieve' /></form> <?php } else { require_once 'header.php'; ?> <p class='instructions'>Choose an unpackaged manifest file (i.e.
$zipLink = null; if (isset($results->zipFile) || isset($results->retrieveResult->zipFile)) { if (isset($results->zipFile)) { $_SESSION['retrievedZips'][$asyncResults->id] = $results->zipFile; unset($results->zipFile); } else { if (isset($results->retrieveResult->zipFile)) { $_SESSION['retrievedZips'][$asyncResults->id] = $results->retrieveResult->zipFile; unset($results->retrieveResult->zipFile); } } displayInfo("Retrieve result ZIP file is ready for download."); print "<p/>"; $zipLink = " | <a id='zipLink' href='?asyncProcessId={$asyncResults->id}&downloadZip' onclick='undownloadedZip=false;' style='text-decoration:none;'>" . "<span style='text-decoration:underline;'>Download ZIP File</span> <img src='" . getPathToStaticResource('/images/downloadIconCompleted.gif') . "' border='0'/>" . "</a></p>"; } $processedResult = ExpandableTree::processResults($results); $tree = new ExpandableTree("metadataStatusResultsTree", $processedResult); $tree->setForceCollapse(true); $tree->setAdditionalMenus($zipLink); $tree->setContainsIds(true); $tree->setContainsDates(true); $tree->printTree(); if (isset($debugInfo["DebuggingInfo"]->debugLog)) { print "<p> </p><h3>Debug Logs</h3>"; print "<pre>" . addLinksToIds(htmlspecialchars($debugInfo["DebuggingInfo"]->debugLog, ENT_QUOTES)) . '</pre>'; } // if metadata changes were deployed, clear the cache because describe results will probably be different if ($isDeployOperation) { WorkbenchContext::get()->clearCache(); } }