| <?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 | |
| *******************************************************************************/ | |
| /** | |
| * This function dumps the descriptive text | |
| * for all of the licenses included in the projects ("Eclipse Public License, 1.0", | |
| * for example). This information is harvested from the Foundation database. | |
| * | |
| * @param $projectids an array of string values: the ids of the projects of interest. | |
| * @return an array containing the descriptive text of the licenses. | |
| */ | |
| function dump_project_licenses(&$projectids) { | |
| global $App; | |
| $sql = "SELECT distinct l.LicenseID as Id, l.Description as License FROM ProjectLicenses as p join (SYS_Licenses as l) on (p.LicenseId = l.LicenseId) where p.ProjectId IN ( '" . implode( "','", $projectids ) . "')"; | |
| log_query($sql); | |
| $result = $App->foundation_sql( $sql ); | |
| //mysql_error_check(); | |
| $licenses = array(); | |
| while( $row = mysql_fetch_assoc($result) ) { | |
| $id = $row['Id']; | |
| $license = $row['License']; | |
| echo "<iplog:license id=\"$id\" description=\"$license\"/>\n"; | |
| } | |
| } | |
| ?> |