@@ -552,25 +552,25 @@ |
||
| 552 | 552 | /** |
| 553 | 553 | * Формирование правильной CSV строки |
| 554 | 554 | * |
| 555 | - * @see: https://stackoverflow.com/questions/3933668/convert-array-into-csv |
|
| 555 | + * @see: https://stackoverflow.com/questions/3933668/convert-array-into-csv |
|
| 556 | 556 | * @param array $data Массив с данными |
| 557 | 557 | * @return string |
| 558 | 558 | */ |
| 559 | 559 | function make_csv($data, $separator = ","){
|
| 560 | - // Create a stream opening it with read / write mode |
|
| 561 | - $stream = fopen('data://text/plain,' . "", 'w+');
|
|
| 560 | + // Create a stream opening it with read / write mode |
|
| 561 | + $stream = fopen('data://text/plain,' . "", 'w+');
|
|
| 562 | 562 | |
| 563 | - // Iterate over the data, writting each line to the text stream |
|
| 564 | - fputcsv($stream, $data, $separator); |
|
| 563 | + // Iterate over the data, writting each line to the text stream |
|
| 564 | + fputcsv($stream, $data, $separator); |
|
| 565 | 565 | |
| 566 | - // Rewind the stream |
|
| 567 | - rewind($stream); |
|
| 566 | + // Rewind the stream |
|
| 567 | + rewind($stream); |
|
| 568 | 568 | |
| 569 | - // You can now echo it's content |
|
| 570 | - $out = stream_get_contents($stream); |
|
| 569 | + // You can now echo it's content |
|
| 570 | + $out = stream_get_contents($stream); |
|
| 571 | 571 | |
| 572 | - // Close the stream |
|
| 573 | - fclose($stream); |
|
| 574 | - return $out; |
|
| 575 | - } |
|
| 572 | + // Close the stream |
|
| 573 | + fclose($stream); |
|
| 574 | + return $out; |
|
| 575 | + } |
|
| 576 | 576 | } |
@@ -17,10 +17,10 @@ discard block |
||
| 17 | 17 | list(, $domain) = explode("@", $email, 2);
|
| 18 | 18 | if (!$dns || ($dns && checkdnsrr($domain, "MX") && checkdnsrr($domain, "A"))) {
|
| 19 | 19 | $error = false; |
| 20 | - }else {
|
|
| 20 | + } else {
|
|
| 21 | 21 | $error = 'dns'; |
| 22 | 22 | } |
| 23 | - }else {
|
|
| 23 | + } else {
|
|
| 24 | 24 | $error = 'format'; |
| 25 | 25 | } |
| 26 | 26 | return $error; |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | $output .= fgets($conn, 128); |
| 356 | 356 | } |
| 357 | 357 | fclose($conn); |
| 358 | - }else {
|
|
| 358 | + } else {
|
|
| 359 | 359 | throw new ErrorException('Could not connect to ' . $nic_server . '!');
|
| 360 | 360 | } |
| 361 | 361 | |