Browse files

Updated db.php of plugin Tld. Most likely iana.org's source code chan…

…ged as db.php parsed rubbish before.
  • Loading branch information...
1 parent fc53643 commit bc9e95587316fbcbcc0950fc470811730290fb21 Marcel Glacki committed Apr 22, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 Phergie/Plugin/Tld/db.php
View
5 Phergie/Plugin/Tld/db.php
@@ -64,15 +64,16 @@
foreach (range(0, $rows->length - 1) as $index) {
$row = $rows->item($index);
$tld = strtolower(ltrim($row->childNodes->item(0)->textContent, '.'));
- $type = $row->childNodes->item(1)->nodeValue;
+ $type = $row->childNodes->item(2)->nodeValue;
if (isset($descriptions[$tld])) {
$description = $descriptions[$tld];
} else {
- $description = $row->childNodes->item(2)->textContent;
+ $description = $row->childNodes->item(4)->textContent;
$regex = '{(^(?:Reserved|Restricted)\s*(?:exclusively\s*)?'
. '(?:for|to)\s*(?:members of\s*)?(?:the|support)?'
. '\s*|\s*as advised.*$)}i';
$description = preg_replace($regex, '', $description);
+ $description = str_replace(array('<td>','</span></td> </td>','<br/><span class="tld-table-so">',"\n"),array('','',', ',' '),$description);
$description = ucfirst(trim($description));
}
$data = array_map(

0 comments on commit bc9e955

Please sign in to comment.