-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_projectCommon.php
More file actions
131 lines (113 loc) · 5.79 KB
/
_projectCommon.php
File metadata and controls
131 lines (113 loc) · 5.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php
$Nav->setLinkList(null);
$PR = "modeling/mdt";
$projectName = "MDT";
$defaultProj = "/uml2";
$isEMFserver = (preg_match("/^emf(?:\.torolab\.ibm\.com)$/", $_SERVER["SERVER_NAME"]));
$isBuildServer = (preg_match("/^(emft|modeling|build)\.eclipse\.org$/", $_SERVER["SERVER_NAME"])) || $isEMFserver;
$isBuildDotEclipseServer = $_SERVER["SERVER_NAME"] == "build.eclipse.org";
$isWWWserver = (preg_match("/^(?:www.|)eclipse.org$/", $_SERVER["SERVER_NAME"]));
$isEclipseCluster = (preg_match("/^(?:www.||download.|download1.|build.)eclipse.org$/", $_SERVER["SERVER_NAME"]));
$debug = (isset ($_GET["debug"]) && preg_match("/^\d+$/", $_GET["debug"]) ? $_GET["debug"] : -1);
$writableRoot = ($isBuildServer ? $_SERVER["DOCUMENT_ROOT"] . "/modeling/includes/" : "/home/data/httpd/writable/www.eclipse.org/");
$writableBuildRoot = $isBuildDotEclipseServer ? "/opt/public/modeling" : "/home/www-data";
$rooturl = "http://" . $_SERVER["HTTP_HOST"] . "/$PR";
$downurl = ($isBuildServer ? "" : "http://www.eclipse.org");
$bugurl = "https://bugs.eclipse.org";
if (isset ($_GET["skin"]) && preg_match("/^(Blue|EclipseStandard|Industrial|Lazarus|Miasma|Modern|OldStyle|Phoenix|PhoenixTest|PlainText|Nova)$/", $_GET["skin"], $regs))
{
$theme = $regs[1];
}
else
{
$theme = "Nova";
}
/* projects/components in cvs */
/* "proj" => "cvsname" */
$cvsprojs = array (); /* should always be empty */
/* sub-projects/components in cvs for projects/components above (if any) */
/* "cvsname" => array("shortname" => "cvsname") */
$cvscoms = array (
"org.eclipse.mdt" => array (
"bpmn2" => "org.eclipse.bpmn2",
"imm" => "org.eclipse.imm",
"mst" => "org.eclipse.mst",
"ocl" => "org.eclipse.ocl",
"papyrus" => "org.eclipse.papyrus",
"sbvr" => "org.eclipse.sbvr",
"uml2" => "org.eclipse.uml2",
"uml2tools" => "org.eclipse.uml2tools",
"xsd" => "org.eclipse.xsd"
/* add more here */
)
);
$aboutcoms = array (
"bpmn2" => ".bpmn2",
"imm" => ".imm",
"modisco" => "modisco",
"mst" => ".mst",
"ocl" => ".ocl",
"papyrus" => ".papyrus",
"sbvr" => ".sbvr",
"uml2" => ".uml2",
"uml2tools" => ".uml2-tools",
"xsd" => ".xsd"
/* add more here */
);
$projects = array (
"BPMN2" => "bpmn2",
"IMM" => "imm",
"MoDisco" => "modisco",
"MST" => "mst",
"OCL" => "ocl",
"Papyrus" => "papyrus",
"SBVR" => "sbvr",
"UML2" => "uml2",
"UML2 Tools" => "uml2tools",
"XSD" => "xsd"
);
$bugcoms = array_flip($projects);
$bugcoms = preg_replace("/ /", "%20", $bugcoms);
$extraprojects = array(); //components with only downloads, no info yet, "prettyname" => "directory"
$nodownloads = array("bpmn2","imm","mst","papyrus","sbvr"); //components with only information, no downloads, or no builds available yet, "projectkey"
$nonewsgroup = array("bpmn2","imm","sbvr"); //components without newsgroup
$nomailinglist = array("modisco"); //components without mailinglist
$incubating = array("bpmn2","imm","mst","papyrus","sbvr","uml2tools"); // components which are still incubating
$nomenclature = "Component"; //are we dealing with "components" or "projects"?
include_once $_SERVER["DOCUMENT_ROOT"] . "/modeling/includes/scripts.php";
$regs = null;
$proj = (isset($_GET["project"]) && preg_match("/^(" . join("|", $projects) . ")$/", $_GET["project"], $regs) ? $regs[1] : getProjectFromPath($PR));
$projct= preg_replace("#^/#", "", $proj);
$buildtypes = array(
"R" => "Release",
"S" => "Stable",
"I" => "Integration",
"M" => "Maintenance",
"N" => "Nightly"
);
$Nav->addCustomNav("About This Project", "/projects/project_summary.php?projectid=modeling.mdt" . (isset ($aboutcoms[$proj]) ? "$aboutcoms[$proj]" : ""), "", 1);
$Nav->addNavSeparator($projectName, "$rooturl/");
foreach (array_keys(array_diff($projects, $extraprojects)) as $z)
{
$Nav->addCustomNav($z, "$rooturl/?project=$projects[$z]", "_self", 2);
}
$Nav->addNavSeparator("Downloads", "$downurl/$PR/downloads/?project=$proj");
$Nav->addCustomNav("Update Manager", "$rooturl/updates/", "_self", 2);
$Nav->addNavSeparator("Documentation", "$rooturl/docs.php?project=$proj");
$Nav->addCustomNav("FAQ", "$rooturl/faq.php?project=$proj", "_self", 2);
$Nav->addCustomNav("Plan", "http://www.eclipse.org/projects/project-plan.php?projectid=modeling.mdt", "_self", 2);
$Nav->addCustomNav("Release Notes", "http://www.eclipse.org/$PR/news/relnotes.php?project=$proj&version=HEAD", "_self", 2);
$Nav->addCustomNav("Search CVS", "http://www.eclipse.org/$PR/searchcvs.php?q=file%3A+org.eclipse." . strtolower($projectName) . "%2F" . ($proj?"org.eclipse.".$proj."%2F":"") . "+days%3A+7", "_self", 2);
$Nav->addNavSeparator("Community", "http://wiki.eclipse.org/Modeling_Corner");
$Nav->addCustomNav("Wiki", "http://wiki.eclipse.org/" . ($proj?$projectName . "-" . strtoupper($proj):$projectName), "_self", 2);
$Nav->addCustomNav("Newsgroups", "$rooturl/newsgroup-mailing-list.php", "_self", 2);
$Nav->addCustomNav("Modeling Corner", "http://wiki.eclipse.org/Modeling_Corner", "_self", 2);
$collist = "&columnlist=changeddate%2Cbug_severity%2Cpriority%2Crep_platform%2Cbug_status%2Cproduct%2Ccomponent%2Cversion%2Ctarget_milestone%2Cshort_desc";
$Nav->addCustomNav("Open Bugs", "$bugurl/bugs/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&product=" . $projectName . (isset ($bugcoms[$proj]) ? "&component=$bugcoms[$proj]" : "") . "&query_format=advanced&order=bug_status%2Ctarget_milestone%2Cbug_id$collist", "_self", 2);
$Nav->addCustomNav("Submit A Bug", "$bugurl/bugs/enter_bug.cgi?product=" . $projectName . (isset ($bugcoms[$proj]) ? "&component=$bugcoms[$proj]" : ""), "_self", 2);
$Nav->addCustomNav("Contributors", "http://www.eclipse.org/$PR/project-info/team.php", "_self", 2);
unset ($bugcoms);
$App->AddExtraHtmlHeader("<link rel=\"stylesheet\" type=\"text/css\" href=\"/modeling/includes/common.css\"/>\n");
addGoogleAnalyticsTrackingCodeToHeader();
$App->Promotion = TRUE; # set true to enable current eclipse.org site-wide promo
?>