blob: b997121a1f00a1872000730c1ac8ba4360b78fae [file] [log] [blame]
droyebd025c2009-10-08 20:42:48 +00001<?php
2/*******************************************************************************
Kit Lo3c7ce142013-03-02 18:22:40 -05003 * Copyright (c) 2009-2013 Eclipse Foundation, IBM Corporation and others.
droyebd025c2009-10-08 20:42:48 +00004 * 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:
Kit Lo3c7ce142013-03-02 18:22:40 -050010 * 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
Kit Lo3c7ce142013-03-02 18:22:40 -050012 * Kit Lo (IBM) - [402192] Extract project source files from Git repositories for translation
13 *******************************************************************************/
14
droyebd025c2009-10-08 20:42:48 +000015require_once("cb_global.php");
16
17$return = array();
18
19$project_id = getHTTPParameter("project_id", "POST");
20$version = getHTTPParameter("version", "POST");
21
22$query = "SELECT m.project_id, m.version, r.train_id, m.location, m.filename FROM map_files m
23 LEFT JOIN release_train_projects r ON m.project_id = r.project_id AND m.version = r.version
24 WHERE m.is_active = 1
25 AND m.project_id = " . returnQuotedString(sqlSanitize($project_id, $dbh)) . "
26 AND m.version = " . returnQuotedString(sqlSanitize($version, $dbh));
27
kitlo2c8d8a92018-04-19 13:25:09 -040028$res = mysqli_query($dbh, $query);
kitlo1d027092018-04-19 17:44:07 -040029if (mysqli_affected_rows($dbh) > 0) {
droya3815a52019-09-25 12:49:18 -040030 while ($line = mysqli_fetch_array($res, MYSQLI_ASSOC)) {
droyebd025c2009-10-08 20:42:48 +000031 echo $line['location'] . "\n";
32 }
kitlod66aa992010-01-22 17:18:19 +000033} else {
Kit Lo3c7ce142013-03-02 18:22:40 -050034 echo "No map files or update sites found for $project_id $version";
droyebd025c2009-10-08 20:42:48 +000035}
Kit Lo3c7ce142013-03-02 18:22:40 -050036?>