Changed the storage format.
diff --git a/commits/mailinglists.php b/commits/mailinglists.php
index 76d9337..155a2e2 100644
--- a/commits/mailinglists.php
+++ b/commits/mailinglists.php
@@ -11,17 +11,18 @@
*******************************************************************************/
require_once dirname(__FILE__) . '/common/common-functions.inc';
-captureMailingLists('eclipse', 'https://dev.eclipse.org/mailman/listinfo');
+captureMailingLists('eclipse.org', 'https://dev.eclipse.org/mailman/listinfo');
-function captureMailingLists($forge, $url) {
+function captureMailingLists($domain, $url) {
createMailingListsTable();
$lists = array();
if ($file = fopen($url, 'r')) {
while ($line = fgets($file)) {
if (preg_match('/"listinfo\/([^"]+)"/', $line, $matches)) {
$name = $matches[1];
- $list = "${url}/${name}";
- dashboard_sql("insert ignore into mailinglists (forge, name, url) values ('$forge', '$name', '$list');");
+ $page = "${url}/${name}";
+ $email = "$name@$domain";
+ dashboard_sql("insert ignore into mailinglists (domain, name, url, email) values ('$domain', '$name', '$page', '$email');");
}
}
fclose($file);
@@ -31,9 +32,10 @@
function createMailingListsTable() {
$sql = "create table if not exists mailinglists (
- forge varchar(20) not null,
+ domain varchar(20) not null,
name varchar(100) not null,
url varchar(100),
+ email varchar(200),
ts timestamp default current_timestamp on update current_timestamp,
primary key (forge, name)
);";