Remove dead code.
Change-Id: I86ab856de190c933df925011237dcf5d002f8fba
diff --git a/tools/kpi.inc b/tools/kpi.inc
index 3e7ff07..ec6b6fb 100755
--- a/tools/kpi.inc
+++ b/tools/kpi.inc
@@ -54,39 +54,7 @@
);
drawPieChart ( 'Top10ContributorsQuarterly', "Top \"Ten\" Projects by Contributor Count ($quarter)", $columns, $rows );
}
-function renderFileTypesChart() {
- // TODO Use the ChartBuilder API.
- global $App;
- list ( $quarter, $start, $end ) = getLastQuarter ( time () );
-
- $sql = "select extension, count from FileTypes order by count desc limit 15";
-
- $rows = array ();
- query ( 'dashboard', $sql, array (), function ($row) use (&$rows) {
- $id = $row ['extension'];
- $name = getExtensionName ( $id );
-
- $count = $row ['count'];
-
- $rows [] = array (
- $name,
- $count
- );
- } );
-
- $columns = array (
- array (
- 'label' => 'File Type',
- 'type' => 'string'
- ),
- array (
- 'label' => 'Number of projects',
- 'type' => 'number'
- )
- );
- drawPieChart ( 'fileTypesChart', "File types by project use", $columns, $rows );
-}
function renderLicensesInUseChart() {
// TODO Use the ChartBuilder API.
global $App;
diff --git a/tools/languages.php b/tools/languages.php
deleted file mode 100644
index 8ca9bd5..0000000
--- a/tools/languages.php
+++ /dev/null
@@ -1,94 +0,0 @@
-<?php
-/*******************************************************************************
- * Copyright (c) 2017 Eclipse Foundation and others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-2.0
- *******************************************************************************/
-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");
-require_once dirname(__FILE__) . '/../classes/Project.class.php';
-require_once dirname(__FILE__) . '/../classes/database.inc';
-require_once dirname(__FILE__) . '/../classes/common.php';
-require_once dirname(__FILE__) . '/../classes/debug.php';
-
-$App = new App();
-$Nav = new Nav();
-$Menu = new Menu();
-include($App->getProjectCommon());
-
-$pageTitle = "Eclipse Projects by Programming Language";
-$pageKeywords = "";
-$pageAuthor = "Wayne Beaton";
-
-ob_start();
-
-$languages = array();
-$sql = "select language, project from ProjectLanguages";
-
-query('dashboard', $sql, array(), function($row) use (&$languages) {
- if ($project = Project::getProject($row['project'])) {
- $languages[$row['language']]['projects'][] = $project;
- }
-});
-
-/**
- * Sort an array based on mapped values. Key/value associations
- * are maintained. A mapping function is provided to transform
- * the elements of the area into values that are fed into the
- * sorting function. The sorting function is optional: if it
- * is not provided, then it is assumed that the mapping function
- * provide numeric values that are compared for sort order.
- *
- * @param mixed $values
- * @param callable $map
- * @param callable $function
- */
-function masort(&$values, $map, $function = 'masort_int') {
- uasort($values, function($a, $b) use ($map, $function) {
- return $function($map($a), $map($b));
- });
-}
-
-/**
- * @internal
- * The default sort comparator.
- */
-function masort_int($a, $b) {return $a == $b ? 0 : $a < $b;}
-
-masort($languages, function($value) {return count($value['projects']);});
-
-// TODO show the file extension mappings.
-
-?>
-<div id="maincontent">
- <div id="midcolumn">
- <h1><?= $pageTitle ?></h1>
- <p>
- <strong>EXPERIMENTAL!</strong>
- </p>
-
- <?php
- foreach($languages as $language => $data) {
- echo "<h3>$language</h3>";
- echo "<ul>";
- masort($data['projects'], function($project) {return $project->getNickname();}, 'strcasecmp');
- /** @var \Project $project */
- foreach($data['projects'] as $project) {
- echo "<li><a href=\"{$project->getUrl()}\">{$project->getFormalName()}</a></li>";
- }
- echo "</ul>";
- }
-
- ?>
-</div>
-</div>
-<?php
-
-$html = ob_get_contents();
-ob_end_clean();
-$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>