| <?php | |
| /******************************************************************************* | |
| * Copyright (c) 2011 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 (Eclipse Foundation)- initial API and implementation | |
| *******************************************************************************/ | |
| /* | |
| * This file generates XML content describing the projects we | |
| * have in IPZilla. This is potentially different from what we | |
| * have in the foundation database. | |
| */ | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); | |
| $App = new App(); | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/Project.class.php"); | |
| header("Content-type: text/xml"); | |
| $sql = "SELECT distinct name from components"; | |
| $result = $App->ipzilla_sql( $sql ); | |
| $projects = array(); | |
| while( $row = mysql_fetch_assoc($result) ) { | |
| $id = $row['name']; | |
| $project = get_project($id); | |
| if (!$project) continue; | |
| $projects[] = $id; | |
| } | |
| sort($projects); | |
| echo "<ipzilla-projects>\n"; | |
| foreach($projects as $project) { | |
| echo "\t<project id=\"$project\"/>\n"; | |
| } | |
| echo "</ipzilla-projects>\n"; | |
| ?> |