diff options
Diffstat (limited to 'includes/downloads-common.php')
-rw-r--r-- | includes/downloads-common.php | 317 |
1 files changed, 0 insertions, 317 deletions
diff --git a/includes/downloads-common.php b/includes/downloads-common.php deleted file mode 100644 index a41d5b36..00000000 --- a/includes/downloads-common.php +++ /dev/null @@ -1,317 +0,0 @@ -<?php - -require_once($_SERVER["DOCUMENT_ROOT"] . "/modeling/includes/downloads-scripts.php"); - -if (is_array($projects)) -{ - $projectArray = getProjectArray($projects, $extraprojects, $nodownloads, $PR); - $tmp = array_keys($projectArray); - $proj = "/" . (isset($_GET["project"]) && preg_match("/^(?:" . join("|", $projects) . ")$/", $_GET["project"]) ? $_GET["project"] : - (sizeof($tmp) > 0 && isset($projectArray[$tmp[0]]) ? $projectArray[$tmp[0]] : "")); -} -else -{ - $proj = ""; -} - -$projct = preg_replace("#^/#", "", $proj); -$topProj = preg_replace("#.+/(.+)#","$1", $PR); - -$numzips = isset($extraZips) ? 0 - sizeof($extraZips) : 0; // if extra zips (new zips added later), reduce the "required" count when testing a build -if (isset($dls[$proj]) && is_array($dls[$proj])) -{ - foreach (array_keys($dls[$proj]) as $z) - { - $numzips += sizeof($dls[$proj][$z]); - } -} - -// include extras-$proj.php or extras-$PR.php -$files = array ($_SERVER["DOCUMENT_ROOT"] . "/$PR/downloads/extras-" . $projct . ".php", $_SERVER["DOCUMENT_ROOT"] . "/$PR/downloads/extras-" . $PR . ".php"); -foreach ($files as $file) -{ - if (file_exists($file)) - { - include_once($file); - break; - } -} - -$hadLoadDirSimpleError = 1; //have we echoed the loadDirSimple() error msg yet? if 1, omit error; if 0, echo at most 1 error -$sortBy = (isset($_GET["sortBy"]) && preg_match("/^(date)$/", $_GET["sortBy"], $regs) ? $regs[1] : ""); -$showAll = (isset($_GET["showAll"]) && preg_match("/^(1)$/", $_GET["showAll"], $regs) ? $regs[1] : "0"); -$showMax = (isset($_GET["showMax"]) && preg_match("/^(\d+)$/", $_GET["showMax"], $regs) ? $regs[1] : ($sortBy == "date" ? "10" : "5")); -$showBuildResults = !isset($_GET["light"]) && !isset($_GET["nostatus"]); // suppress display of status to render page faster -$doRefreshPage = false; - -$PWD = getPWD("$projct/downloads/drops"); // see scripts.php -$isTools = isset($_GET["tools"]); -$isTech = isset($_GET["tech"]); -if (preg_match("#/(tools|technology)/#", $PWD, $m)) -{ - $isTools = $m[1] == "tools"; - $isTech = $m[1] == "technology"; -} - -if ($isBuildServer || false != strpos($_SERVER["HTTP_HOST"], "fullmoon")) //internal -{ - $downloadScript = "../../../"; - $downloadPre = "../../.."; -} -else // all others -{ - $downloadScript = "http://www.eclipse.org/downloads/download.php?file="; - $downloadPre = ""; -} - -/* these are possible deps, the actual deps must be a subset of these and are read from build.cfg */ -/* See also: - genBuildDetails.sh (depNames array), - downloads-common.php ($deps array), and - build-common.php (<b>Dependency URLs</b> & function findCatg()) -*/ -$deps = array( - "eclipse" => "<a href=\"http://www.eclipse.org/eclipse/\">Eclipse</a>", - - "emf" => "<a href=\"http://www.eclipse.org/modeling/emf/?project=emf#emf\">EMF</a>", - "query" => "<a href=\"http://www.eclipse.org/modeling/emf/?project=query#query\">Query</a>", - "transaction" => "<a href=\"http://www.eclipse.org/modeling/emf/?project=transaction#transaction\">Transaction</a>", - "validation" => "<a href=\"http://www.eclipse.org/modeling/emf/?project=validation#validation\">Validation</a>", - - "compare" => "<a href=\"http://www.eclipse.org/modeling/emft/?project=compare#compare\">Compare</a>", - "net4j" => "<a href=\"http://www.eclipse.org/modeling/emft/?project=net4j#net4j\">Net4j</a>", - "mwe" => "<a href=\"http://www.eclipse.org/modeling/emft/?project=mwe#mwe\">MWE</a>", - "ocltools" => "<a href=\"http://www.eclipse.org/modeling/emft/?project=ocltools#ocltools\">OCL Tools</a>", - - "ocl" => "<a href=\"http://www.eclipse.org/modeling/mdt/?project=ocl#ocl\">OCL</a>", - "uml2" => "<a href=\"http://www.eclipse.org/modeling/mdt/?project=uml2#uml2/\">UML2</a>", - "uml2tools" => "<a href=\"http://www.eclipse.org/modeling/mdt/?project=uml2tools#uml2tools\">UML2 Tools</a>", - - "gef" => "<a href=\"http://www.eclipse.org/gef/\">GEF</a>", - "gmf" => "<a href=\"http://www.eclipse.org/gmf/\">GMF</a>", - "orbit" => "<a href=\"http://download.eclipse.org/tools/orbit/downloads/\">Orbit</a>", "lpg" => "<a href=\"http://download.eclipse.org/tools/orbit/downloads/\">LPG</a>", - "wtp" => "<a href=\"http://www.eclipse.org/wtp/\">WTP</a>", -); - -// TODO: move this out into the per-project or per-component pages -/* shortname => array("product", "component") */ -$bugzilla_pairs = array( - "emf" => array("EMF", ""), - "gmf" => array("GMF", ""), - "xsd" => array("MDT", "XSD"), - "ocl" => array("MDT", "OCL"), - "eodm" => array("MDT", "EODM"), - "uml2" => array("MDT", "UML2"), - "uml2tools" => array("MDT", "UML2%20Tools"), - "compare" => array("EMFT", "Compare"), - "teneo" => array("EMFT", "Teneo"), - "cdo" => array("EMFT", "CDO"), - "net4j" => array("EMFT", "NET4J"), - "mwe" => array("EMFT", "MWE"), -); - -print "<div id=\"midcolumn\">\n"; -print "<h1>Downloads</h1>\n"; - -if (is_array($projects) && sizeof($projects) > 1) -{ - print doSelectProject($projectArray, $proj, $nomenclature, "homeitem3col", $showAll, $showMax, $sortBy); -} - -$branches = loadDirSimple($PWD, ".*", "d"); -rsort($branches); -$buildTypes = getBuildTypes($branches, $buildtypes); - -$builds = getBuildsFromDirs(); -if ($sortBy != "date") -{ - - $builds = reorderAndSplitArray($builds, $buildTypes); - $releases = $builds[1]; - $builds = $builds[0]; -} -else -{ - krsort($builds); reset($builds); -} - -if (function_exists("doRequirements")) -{ - call_user_func("doRequirements"); -} - -$rssfeed = "<a href=\"http://www.eclipse.org/downloads/download.php?file=/$PR/feeds/builds-$projct.xml\"><img style=\"float:right\" alt=\"Modeling Build Feed\" src=\"/modeling/images/rss-atom10.gif\"/></a>"; - -if (sizeof($builds) == 0 && sizeof($releases) == 0) -{ - print "<div class=\"homeitem3col\">\n"; - print "<h3>${rssfeed}Builds</h3>\n"; - print "<ul class=\"releases\">\n"; - if (is_array($projectArray) && !in_array($projct, $projectArray)) - { - print "<li><i><b>Sorry!</b></i> There are no builds yet available for this component.</li>"; - } - else - { - print "<li><i><b>Error!</b></i> No builds found on this server!</li>"; - } - print "</ul>\n"; - print "</div>\n"; -} - -if ($sortBy != "date") -{ - doLatest($releases, "Releases"); - - $c = 0; - foreach ($builds as $branch => $types) - { - foreach ($types as $type => $IDs) - { - print "<div class=\"homeitem3col\">\n"; - print "<h3>$rssfeed" . $buildTypes[$branch][$type] . "s</h3>\n"; - print "<ul class=\"releases\">\n"; - $i = 0; - foreach ($IDs as $ID) - { - print outputBuild($branch, $ID, $c++); - $i++; - - if (!$showAll && $i == $showMax && $i < sizeof($IDs)) - { - print showToggle($showAll, $showMax, $sortBy, sizeof($IDs)); - break; - } - else if ($showAll && sizeof($IDs) > $showMax && $i == sizeof($IDs)) - { - print showToggle($showAll, $showMax, $sortBy, sizeof($IDs)); - } - } - print "</ul>\n"; - print "</div>\n"; - } - } -} -else if ($sortBy == "date") -{ - doLatest($builds, "Builds"); -} - -if ($doRefreshPage) -{ ?> -<script type="text/javascript"> - setTimeout('document.location.reload()', 60*1000); // refresh every 60 seconds if there's a build in progress -</script> -<?php } - -if (function_exists("requirementsNote")) -{ - requirementsNote(); -} - -if (isset($oldrels) && is_array($oldrels) && sizeof($oldrels) > 0) -{ - showArchived($oldrels); -} - -$extras = array("doLanguagePacks", "showNotes"); - -foreach ($extras as $z) -{ - if (function_exists($z)) - { - call_user_func($z); - } -} - -print "</div>\n"; - -print "<div id=\"rightcolumn\">\n"; - -$extras = array("doBleedingEdge"); - -foreach ($extras as $z) -{ - if (function_exists($z)) - { - call_user_func($z); - } -} - -print "<div class=\"sideitem\">\n"; -print "<h6>Additional Info</h6>\n"; -print "<ul>\n"; -print "<li><a href=\"http://www.eclipse.org/$PR/faq.php\">FAQs</a></li>\n"; -print "<li><a href=\"#archives\">Archived Releases</a></li>\n"; -print "<li><a href=\"http://www.eclipse.org/modeling/downloads/build-types.php\">About Build Types</a></li>\n"; -print "<li><a href=\"http://www.eclipse.org/modeling/downloads/verifyMD5.php\">Using md5 Files</a></li>\n"; -if (isset($bugzilla_pairs[$projct])) -{ - print "<li><a href=\"https://bugs.eclipse.org/bugs/buglist.cgi?product={$bugzilla_pairs[$projct][0]}&component={$bugzilla_pairs[$projct][1]}&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED\">Open Bugs</a></li>\n"; -} -else -{ - print "<li><a href=\"https://bugs.eclipse.org/bugs/buglist.cgi?product=$topProj&component=$projct&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED\">Open Bugs</a></li>\n"; -} -print "<li><a href=\"http://www.eclipse.org/$PR/news/relnotes.php?project=$projct&version=HEAD\">Release Notes</a></li>\n"; -print "</ul>\n"; -print "</div>\n"; - -print "<div class=\"sideitem\">\n"; -print "<h6>Getting Sources</h6>\n"; -print "<ul>\n"; -print "<li><a href=\"http://wiki.eclipse.org/EMF/Getting_Source\">CVS + Eclipse</a></li>\n"; -print "<li><a href=\"http://wiki.eclipse.org/index.php/CVS_Source_From_Mapfile\">CVS + Map File + Script</a></li>\n"; -print "<li><a href=\"http://www.eclipse.org/$PR/downloads/?project=$projct\">SDK zip</a> or <a href=\"http://www.eclipse.org/$PR/updates/\">Update Manager</a> (org.*.source_x.y.z.*/*src.zip)</li>\n"; -print "</ul>\n"; -print "</div>\n"; - -if (isset($NLpacks) && is_array($NLpacks)) -{ - print "<div class=\"sideitem\">\n"; - print "<h6>Language Packs</h6>\n"; - print "<ul>\n"; - foreach (array_keys($NLpacks) as $z) - { - print "<li><a href=\"#$NLpacks[$z]\">$z</a></li>\n"; - } - print "</ul>\n"; - print "</div>\n"; -} - -print "<div class=\"sideitem\">\n"; -print "<h6>Sort</h6>\n"; -$newsort = ($sortBy == "date" ? "type" : "date"); -print "<ul>\n"; -print "<li><a href=\"?project=$projct&showAll=$showAll&showMax=$showMax&sortBy=$newsort\">By " . ucfirst($newsort) . "</a></li>\n"; -print "</ul>\n"; -print "</div>\n"; - -$f = $_SERVER["DOCUMENT_ROOT"] . "/$PR/build/sideitems-common.php"; -if (file_exists($f)) -{ - include_once($f); -} - -if (function_exists("sidebar")) -{ - sidebar(); -} - -if (isset($incubating) && in_array($projct, $incubating)) -{ -?> -<div class="sideitem"> - <h6>Incubation</h6> - <p>This component is currently in its <a href="http://www.eclipse.org/projects/dev_process/validation-phase.php">Validation (Incubation) Phase</a>.</p> - <div align="center"><a href="http://www.eclipse.org/projects/what-is-incubation.php"><img - align="center" src="http://www.eclipse.org/images/egg-incubation.png" - border="0" /></a></div> - </div> -<?php -} - -print "</div>\n"; - - -?> |