*** empty log message ***
diff --git a/ip_log/ip_log_code.php b/ip_log/ip_log_code.php
index 4635ab5..142bf6b 100644
--- a/ip_log/ip_log_code.php
+++ b/ip_log/ip_log_code.php
@@ -6,21 +6,16 @@
$debug = $_GET[debug]; // are we in debug mode?
-//Table of contents
-//$toc_url = "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.orbit/org.eclipse.orbit.releng/ip_logs/toc.txt?root=Tools_Project&view=co";
-//$toc_url = "http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.orbit/org.eclipse.orbit.releng/ip_logs/toc.txt?revision=1.1.2.3&root=Tools_Project&pathrev=set1";
-$toc_url = "toc.txt";
-debug("Processing: ".$toc_url);
-
-//Get the filenames
-$file_names = file($toc_url, FILE_IGNORE_NEW_LINES);
-
-if (!$file_names) {
- debug("Error processing toc.");
-} else {
- debug("Files in toc: ".count($file_names));
- var_dump($file_names);
+$file_names = array();
+$handle = opendir(".");
+while (false !== ($file = readdir($handle))) {
+ if (is_file($file) && ereg("\.ip_log",$file)) {
+ array_push($file_names, $file);
+ }
}
+closedir($handle);
+
+debug("IP Files: ".count($file_names));
echo "<table BORDER=0 CELLSPACING=5 CELLPADDING=2 WIDTH=\"100%\" >\n";
foreach ($file_names as $file) {
@@ -36,23 +31,40 @@
function printProject($project) {
echo "<tr>\n";
echo "<td width=\"2%\" align=RIGHT valign=TOP><img src=\"http://eclipse.org/images/Adarrow.gif\" width=\"16\" height=\"16\" border=\"0\"></td>\n";
- echo "<td width=\"98%\"><b>".$project->info->name."</b> ";
- echo "<a href=\"http://dev.eclipse.org/viewcvs/index.cgi/".$project->info->location."/?root=Tools_Project&pathrev=".$project->info->tag."\" style=\"text-decoration: none\">".$project->version."</a> ";
+ echo "<td width=\"98%\">";
+ echo "<b><a href=\"".$project->info->reference."\">".$project->info->name."</a></b> version ".$project->version." ";
+ echo "<a href=\"http://dev.eclipse.org/viewcvs/index.cgi/".$project->info->location."/?root=Tools_Project&pathrev=".$project->info->tag."\" style=\"text-decoration: none\">(".$project->id.")</a> ";
+ $colour;
switch ($project->status) {
case "done" :
- echo "<font color=green>status:green</font>";
+ $colour=green;
break;
default :
- echo "<font color=red>status:red</font>";
+ $colour=red;
break;
}
+ echo "<font color=".$colour.">status:".$colour."</font>";
+ echo "<br><strong>Contact:</strong> <a href=\"mailto:".$project->contact->email."\">".$project->contact->name."</a> (".$project->contact->company.")<br>\n";
+ foreach ($project->legal as $legal) {
+ echo "<strong>Legal:</strong><br>\n";
+ if (isSet($legal->package)) {
+ echo tab()."package: ".$legal->package."<br>\n";
+ }
+
+ echo tab()."ipzilla: <a href=\"https://dev.eclipse.org/ipzilla/show_bug.cgi?id=".$legal->ipzilla."\">".$legal->ipzilla."</a><br>\n";
+ echo tab()."reference: <a href=\"".$legal->license->reference."\">".$legal->license->name."</a><br>\n";
+ }
foreach ($project->notes as $note) {
- echo "<p>".$note."\n";
+ echo "<strong>Note:</strong> ".$note."<p>\n";
}
echo "\n</td>\n";
echo "</tr>\n";
}
+function tab() {
+ return " ";
+}
+
// print out the given message if we are in debug mode
function debug($str) {
global $debug;
diff --git a/ip_log/test01.xml b/ip_log/org.apache.xerces.ip_log
similarity index 100%
rename from ip_log/test01.xml
rename to ip_log/org.apache.xerces.ip_log
diff --git a/ip_log/test02.xml b/ip_log/org.apache.xmlrpc.ip_log
similarity index 100%
rename from ip_log/test02.xml
rename to ip_log/org.apache.xmlrpc.ip_log
diff --git a/ip_log/parse_dom.php b/ip_log/parse_dom.php
index 76eb594..967b555 100644
--- a/ip_log/parse_dom.php
+++ b/ip_log/parse_dom.php
@@ -29,7 +29,7 @@
} else if (strcasecmp($child->nodeName, ELEMENT_NOTES) == 0) {
$project->notes = createNotes($child);
} else if (strcasecmp($child->nodeName, ELEMENT_LEGAL) == 0) {
- $project->legal = createLegal($child);
+ $project->legal[] = createLegal($child);
} else {
// TODO error
}
@@ -91,21 +91,50 @@
function createNotes($node) {
$result = array();
$children = $node->childNodes;
- $count = $children->length;
foreach ($children as $child) {
if ($child->nodeType != XML_ELEMENT_NODE) continue;
if (strcasecmp($child->nodeName, ELEMENT_NOTE) != 0) continue;
// we have a <note> element so store the text
foreach ($child->childNodes as $sub) {
if ($sub->nodeType != XML_TEXT_NODE) continue;
- $result[count($result)] = $sub->wholeText;
+ $result[] = $sub->wholeText;
}
}
return $result;
}
function createLegal($node) {
+ $legal = new legal();
+ $children = $node->childNodes;
+ foreach ($children as $child) {
+ if ($child->nodeType != XML_ELEMENT_NODE) continue;
+ if (strcasecmp($child->nodeName, ELEMENT_IPZILLA) == 0) {
+ $legal->ipzilla = $child->getAttribute(ATTRIBUTE_BUG_ID);
+ } else if (strcasecmp($child->nodeName, ELEMENT_LICENSE) == 0) {
+ $legal->license = createLicense($child);
+ } else if (strcasecmp($child->nodeName, ELEMENT_PACKAGE) == 0) {
+ $legal->package = getText($child);
+ } else {
+ // TODO error
+ }
+ }
+ return $legal;
+}
+function createLicense($node) {
+ $license = new license();
+ $children = $node->childNodes;
+ foreach ($children as $child) {
+ if ($child->nodeType != XML_ELEMENT_NODE) continue;
+ if (strcasecmp($child->nodeName, ELEMENT_NAME) == 0) {
+ $license->name = getText($child);
+ } else if (strcasecmp($child->nodeName, ELEMENT_REFERENCE) == 0) {
+ $license->reference = getText($child);
+ } else {
+ // TODO error
+ }
+ }
+ return $license;
}
?>
\ No newline at end of file