blob: e7f12d660c459e1fcfd3fc77fc43dd2a0bca8504 [file] [log] [blame]
droyebd025c2009-10-08 20:42:48 +00001<?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
kitlod66aa992010-01-22 17:18:19 +000011 * Kit Lo (IBM) - Bug 299402, Extract properties files from Eclipse project update sites for translation
droyebd025c2009-10-08 20:42:48 +000012*******************************************************************************/
13require_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);
kitlod66aa992010-01-22 17:18:19 +000027if (mysql_affected_rows($dbh) > 0) {
28 while ($line = mysql_fetch_array($res, MYSQL_ASSOC)) {
droyebd025c2009-10-08 20:42:48 +000029 echo $line['location'] . "\n";
30 }
kitlod66aa992010-01-22 17:18:19 +000031} else {
32 echo "No map files or update sites found for $project_id $version.";
droyebd025c2009-10-08 20:42:48 +000033}
kitlod66aa992010-01-22 17:18:19 +000034?>