| <?php |
| /******************************************************************************* |
| * Copyright (c) 2014 Eclipse Foundation and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Wayne Beaton - initial API and implementation |
| *******************************************************************************/ |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/Project.class.php"); |
| |
| header("Content-Type: text/plain"); |
| |
| // Note that get_project_from_pmi checks for valid form. |
| if ($project = get_project_from_pmi($_GET['id'])) { |
| $id = $project->getId(); |
| |
| $entries = array(); |
| |
| if ($description = $project->getDescription()) { |
| $entries[] = array( |
| "Project description:", |
| trim(html_entity_decode(strip_tags($description))), |
| "https://projects.eclipse.org/projects/$id" |
| ); |
| } |
| |
| $entries[] = array( |
| "Developer resources:", |
| "Information regarding source code management, builds, coding standards, and more.", |
| "https://projects.eclipse.org/projects/$id/developer"); |
| |
| $entries[] = array( |
| "Contributor License Agreement:", |
| "Before your contribution can be accepted by the project," |
| . " you need to create and electronically sign the" |
| . " Eclipse Foundation Contributor License Agreement (CLA).", |
| "http://www.eclipse.org/legal/CLA.php" |
| ); |
| |
| if ($devList = $project->getDevListUrl()) { |
| $entries[] = array( |
| 'Contact:', |
| "Contact the project developers via the project's \"dev\" list.", |
| $devList); |
| } |
| |
| if ($product = $project->getBugzillaProduct()) { |
| // FIXME What about PolarSys and LocationTech? |
| $search = "https://bugs.eclipse.org/bugs/buglist.cgi?product=$product"; |
| $create = "https://bugs.eclipse.org/bugs/enter_bug.cgi?product=$product"; |
| |
| if ($components = $project->getBugzillaComponents()) { |
| $search .= "&" . $components[1]; |
| $create .= "&" . $components[1]; |
| } |
| |
| $entries[] = array( |
| "Search for bugs:", |
| "This project uses Bugzilla to track ongoing development and issues.", |
| $search); |
| $entries[] = array( |
| "Create a new bug:", |
| "Be sure to search for existing bugs before you create another one." |
| ." Remember that contributions are always welcome!", |
| $create); |
| } |
| } |
| |
| function renderTitle($text, $char = '=') { |
| echo $text; |
| echo "\n"; |
| for($count=0;$count<strlen($text);$count++) echo $char; |
| echo "\n"; |
| } |
| ?> |
| <?php renderTitle("Contributing to " . $project->getName()); ?> |
| |
| Thanks for your interest in this project. |
| <?php |
| foreach($entries as $entry) { |
| echo "\n"; |
| renderTitle($entry[0], '-'); |
| echo "\n"; |
| echo $entry[1]; |
| echo "\n\n"; |
| echo '- ' . $entry[2]; |
| echo "\n"; |
| } |
| ?> |