Skip to content

Commit

Permalink
Remove all other config if "alias" exists
Browse files Browse the repository at this point in the history
  • Loading branch information
khalahan committed Jun 16, 2013
1 parent 6eaef29 commit 9e8e551
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions name.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,12 @@ private function cleanBadRecords($data) {
case 'translate': // delete all subdomains
unset($data->map);
break;
case 'alias': // ignore ip & ip6
unset($data->ip);
unset($data->ip6);
unset($data->translate);
case 'alias': // remove all except alias & map
foreach($data as $k => $v) {
if (!in_array($k, array('alias', 'map'))) {
unset($data->$k);
}
}
break;
case 'map':
if(isset($data->map)) {
Expand Down

0 comments on commit 9e8e551

Please sign in to comment.