| <?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 |
| *******************************************************************************/ |
| |
| header("Content-type: text/plain"); |
| |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); |
| $App = new App(); |
| |
| $sql = "select distinct name, path, git, description from repositories where path like '/gitroot/%'"; |
| $result = $App->dashboard_sql($sql); |
| while ($row = mysql_fetch_assoc($result)) { |
| $path = $row['git']; |
| $name = $row['name']; |
| $description = trim($row['description']); |
| $lines = explode("\n",$description); |
| $description = trim($lines[0]); |
| if (!description || preg_match('/^Unnamed repository/', $description)) |
| $description = "An eclipse.org repository named $name"; |
| echo "$path\t$name\t$description\n"; |
| } |
| |
| ?> |