Permalink
Browse files

Further ohloh enhancements

  • Loading branch information...
1 parent ed15fe3 commit 4cec069259745b36b33bff764915abe7282b4eec @CloCkWeRX committed Apr 13, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 admin-ohloh.php
View
@@ -16,15 +16,20 @@
$enlistments = array();
foreach ($document->result->enlistment as $enlistment) {
- $enlistments[] = $enlistment->url;
+ $enlistments[] = trim((string)$enlistment->repository->url);
}
$github = array();
$result = file_get_contents('https://api.github.com/orgs/pear/repos');
$result = json_decode($result);
foreach ($result as $item) {
- $github[] = 'git://github.com/pear/' . $item->name . ".git";
+ $github[] = trim('git://github.com/pear/' . trim($item->name) . ".git");
+}
+
+print "Things not counted on Ohloh, Oh no!\n";
+foreach ($github as $gh) {
+ if (!in_array($gh, $enlistments)) {
+ print $gh . "\n";
+ }
}
-print "Things not counted on Ohloh, Oh no!\n:";
-print_r(array_diff($github, $enlistments));

0 comments on commit 4cec069

Please sign in to comment.