| <?php |
| /******************************************************************************* |
| * Copyright (c) 2016 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 |
| *******************************************************************************/ |
| require_once (dirname(__FILE__) . "/../../eclipse.org-common/system/app.class.php"); |
| require_once (dirname(__FILE__) . "/../../eclipse.org-common/system/nav.class.php"); |
| require_once (dirname(__FILE__) . "/../../eclipse.org-common/system/menu.class.php"); |
| $App = new App(); |
| $Nav = new Nav(); |
| $Menu = new Menu(); |
| |
| $pageKeywords = ""; |
| $pageTitle = "Eclipse Mars.2 Change Log"; |
| $pageAuthor = "Wayne Beaton"; |
| |
| function getProjectList() { |
| return array( |
| 'Platform' => array( |
| 'products' => array('JDT', 'PDE', 'Platform'), |
| 'milestones' => array('4.5.2') |
| ), |
| |
| 'EGit' => array( |
| 'products' => array('EGit'), |
| 'milestones' => array('4.2') |
| ) |
| ); |
| } |
| |
| function getBugListSql() { |
| $where = array(); |
| foreach(getProjectList() as $name => $product) { |
| $x = join("','", $product['products']); |
| $y = join("','", $product['milestones']); |
| $where[] = "products.name in ('$x') and bugs.target_milestone in ('$y')"; |
| } |
| $whereString = join(') OR (', $where); |
| if (count($where) > 1) $whereString = "($whereString)"; |
| |
| $sql = " |
| SELECT |
| bugs.bug_id as id, bugs.short_desc as title, |
| products.name as product, components.name as component, |
| target_milestone as milestone |
| FROM bugs |
| JOIN products on (bugs.product_id = products.id) |
| JOIN components on (bugs.component_id = components.id) |
| WHERE |
| ($whereString) AND resolution='FIXED' |
| ORDER BY products.name, components.name"; |
| |
| return $sql; |
| } |
| |
| function dumpBugList() { |
| global $App; |
| |
| echo "<table style=\"border-spacing:5px;border-collapse:separate\">"; |
| echo "<tr><th>Id</td><th>Feature</td><th>Summary</th></tr>"; |
| $result = $App->bugzilla_sql(getBugListSql()); |
| while ($row=mysql_fetch_assoc($result)) { |
| $id = $row['id']; |
| $title = htmlspecialchars($row['title']); |
| $project = $row['product']; |
| |
| echo "<tr><td><a href=\"https://bugs.eclipse.org/$id\">$id</a></td><td>$project</td><td>$title</td></tr>"; |
| } |
| echo "</table>"; |
| } |
| |
| ob_start(); |
| ?> |
| <div id="maincontent"> |
| <div id="midcolumn"> |
| <h1><?= $pageTitle ?></h1> |
| |
| <h3>Change Log for Mars.2</h3> |
| |
| <?php dumpBugList(); ?> |
| |
| </div> |
| </div> |
| <?php |
| $html = ob_get_contents(); |
| ob_end_clean(); |
| $App->generatePage(null, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html ); |
| ?> |