Permalink
Browse files

Merge remote-tracking branch 'gelignite/issueTldDb' into pull/222

  • Loading branch information...
2 parents 6c574b3 + bc9e955 commit 986bb979a7714558512c436dd5e1fc6deafb4b38 @elazar elazar committed Jul 1, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 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 986bb97

Please sign in to comment.