function main($params) { $params = parseParams($argv); if ($params['file']) { $locations = file($params['file']); # Per chris.chih from CDNetworks <*****@*****.**> # in March, 2014 email to Reuben, we can do 60 cache clear requests # with up to 1,000 urls per request $MAX_URLS = 1000; if (!is_array($locations) || count($locations) > $MAX_URLS) { print "error: specified file '{$params['file']}' must contain a list of urls, one per line, at most {$MAX_URLS}\n"; exit; } $locations = array_map(parseLocation, $locations); } else { $locations = array(parseLocation($params['url'])); } $html = CDNetworksSupport::doCDnetworksApiCall($params, $locations); print "response from CDNetworks:\n"; print $html . "\n"; }
$plugin = $aParts[1]; if ($aParts[1] == "CVS,tag") { $tagPart = split(",", $aParts[2]); $cvsRootPart = split(",", $aParts[3]); $plugin = $tagPart[0] . "," . $cvsRootPart[0] . "," . $aParts[4]; } elseif ($aParts[1] == "SVN,url") { # Support STEM project SVN syntax # plugin@org.eclipse.stem.core=SVN,url=http://dev.eclipse.org/svnroot/technology/org.eclipse.stem,tag=trunk,path=core/org.eclipse.stem.core # # maps $plugin to: # SVN,<tagPath>[:revision],<svnRepositoryURL>,<preTagPath>,<postTagPath> $svnRootPart = split(",", $aParts[2]); $svnTagPart = split(",", $aParts[3]); $plugin = "SVN," . $svnTagPart[0] . "," . $svnRootPart[0] . ",," . $aParts[4]; } $aStuff = parseLocation($plugin); $tagstring = ""; if (isset($aStuff['tag'])) { $tagstring = "-r " . $aStuff['tag'] . " "; } if (isset($aStuff['plugin'])) { if ($aStuff['plugin'] != "") { $aElements[1] = $aStuff['plugin']; } } $command = ""; # determine CVS or SVN if (isset($aStuff['cvsroot'])) { $command = "cvs -q -d " . $aStuff['cvsroot'] . " co " . $tagstring . $aElements[1]; } elseif (isset($aStuff['svnroot'])) { $command = "/usr/local/bin/svn co " . $aStuff['svnroot'] . " --config-dir /tmp";
function getLocationURL($gridURI, $region, $location) { $region = rawurlencode($region); if (strpos($gridURI, 'lindenlab.com')) { $url = "secondlife://{$region}/" . parseLocation($location); //linden grid , use second life link style } else { $url = "opensim://{$gridName}/{$region}/{$location}"; } return "<a class=\"slurl\" href={$url}>{$url}</a>"; }