droy | ebd025c | 2009-10-08 20:42:48 +0000 | [diff] [blame] | 1 | <?php |
| 2 | /******************************************************************************* |
| 3 | * Copyright (c) 2009 Eclipse Foundation and others. |
| 4 | * All rights reserved. This program and the accompanying materials |
| 5 | * are made available under the terms of the Eclipse Public License v1.0 |
| 6 | * which accompanies this distribution, and is available at |
| 7 | * http://www.eclipse.org/legal/epl-v10.html |
| 8 | * |
| 9 | * Contributors: |
| 10 | * Eclipse Foundation - initial API and implementation |
kitlo | d66aa99 | 2010-01-22 17:18:19 +0000 | [diff] [blame^] | 11 | * Kit Lo (IBM) - Bug 299402, Extract properties files from Eclipse project update sites for translation |
droy | ebd025c | 2009-10-08 20:42:48 +0000 | [diff] [blame] | 12 | *******************************************************************************/ |
| 13 | require_once("cb_global.php"); |
| 14 | |
| 15 | $return = array(); |
| 16 | |
| 17 | $project_id = getHTTPParameter("project_id", "POST"); |
| 18 | $version = getHTTPParameter("version", "POST"); |
| 19 | |
| 20 | $query = "SELECT m.project_id, m.version, r.train_id, m.location, m.filename FROM map_files m |
| 21 | LEFT JOIN release_train_projects r ON m.project_id = r.project_id AND m.version = r.version |
| 22 | WHERE m.is_active = 1 |
| 23 | AND m.project_id = " . returnQuotedString(sqlSanitize($project_id, $dbh)) . " |
| 24 | AND m.version = " . returnQuotedString(sqlSanitize($version, $dbh)); |
| 25 | |
| 26 | $res = mysql_query($query,$dbh); |
kitlo | d66aa99 | 2010-01-22 17:18:19 +0000 | [diff] [blame^] | 27 | if (mysql_affected_rows($dbh) > 0) { |
| 28 | while ($line = mysql_fetch_array($res, MYSQL_ASSOC)) { |
droy | ebd025c | 2009-10-08 20:42:48 +0000 | [diff] [blame] | 29 | echo $line['location'] . "\n"; |
| 30 | } |
kitlo | d66aa99 | 2010-01-22 17:18:19 +0000 | [diff] [blame^] | 31 | } else { |
| 32 | echo "No map files or update sites found for $project_id $version."; |
droy | ebd025c | 2009-10-08 20:42:48 +0000 | [diff] [blame] | 33 | } |
kitlo | d66aa99 | 2010-01-22 17:18:19 +0000 | [diff] [blame^] | 34 | ?> |