| <?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop' |
| /******************************************************************************* |
| * Copyright (c) 2009 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: |
| * Eclipse Foundation- initial API and implementation |
| *******************************************************************************/ |
| |
| |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/projects/projectInfoData.class.php"); |
|
|
| require_once $_SERVER['DOCUMENT_ROOT'] . '/projects/classes/IPLog.class.php'; |
| |
| function dump_project_contributors(&$projectids, $apply_corrections = false) { |
| $projects = array();
|
| foreach($projectids as $id) {
|
| $projects[] = getProject($id);
|
| } |
| |
| $log = new IPLog($projects);
|
| $contributors = $log->getContributions(); |
| |
| foreach($contributors as $contributor) { |
| dump_contributor($contributor); |
| } |
| } |
| |
| function dump_contributor(&$contributor) { |
| if (!$contributor->contributions) return; |
| $name = $contributor->name; |
| if (!$name) { |
| if (preg_match('/^(.*)@/', $contributor->email, $matches)) { |
| $name = preg_replace('/[^[:alpha:]\']+/', ' ', $matches[1]); |
| } else { |
| $name = $contributor->email; |
| } |
| } |
| $name = htmlentities($name, ENT_COMPAT | ENT_XML1); |
| $id = htmlentities($contributor->email, ENT_COMPAT | ENT_XML1); |
| echo "<iplog:contributor id=\"$id\" name=\"$name\">\n"; |
| foreach($contributor->contributions as $contribution) { |
| dump_contribution($contribution); |
| } |
| echo "</iplog:contributor>\n"; |
| } |
| |
| function dump_contribution(&$contribution) { |
| $id = $contribution->ref; |
| $size = $contribution->size; |
| $description = htmlentities($contribution->comments, ENT_COMPAT | ENT_XML1); |
| $url = $contribution->link; |
| |
| echo "<iplog:contribution id=\"$id\" size=\"$size\" description=\"$description\" url=\"$url\"/>\n"; |
| } |
| ?> |