diff -u -ru whois-409552/whois.module whois-refact/whois.module --- whois-409552/whois.module 2009-06-05 16:48:10.000000000 +0200 +++ whois-refact/whois.module 2009-06-05 16:53:53.000000000 +0200 @@ -164,20 +164,21 @@ $data = ''; $result = whois_get_whois($address); if ($result) { - switch($option) { + $option = variable_get('whois_output_method', 'html'); + switch ($option) { case 'html': if (!empty($result['rawdata'])) { $utils = new utils; $data .= $utils->showHTML($result); } else { - $data .= implode($whois->Query['errstr'],"\n

"); + $data .= implode($whois->Query['errstr'], "\n
"); } break; case 'object': if ($whois->Query['status'] < 0) { - $data .= implode($whois->Query['errstr'],"\n

"); + $data .= implode($whois->Query['errstr'], "\n
"); } else { $utils = new utils; @@ -185,12 +186,13 @@ } break; + case 'basic': // 'basic' is the default default: - if(!empty($result['rawdata'])) { - $data .= '
' . implode($result['rawdata'],"\n") . '
'; + if (!empty($result['rawdata'])) { + $data .= '
' . implode($result['rawdata'], "\n") . '
'; } else { - $data .= implode($whois->Query['errstr'],"\n

"); + $data .= implode($whois->Query['errstr'], "\n