@@ -51,11 +51,9 @@ discard block |
||
| 51 | 51 | and (!$host or $host == 'localhost') |
| 52 | 52 | ) { |
| 53 | 53 | $link = @mysqli_connect($host, $login, $pass, '', null, $socket); |
| 54 | - } |
|
| 55 | - elseif ($port) { |
|
| 54 | + } elseif ($port) { |
|
| 56 | 55 | $link = @mysqli_connect($host, $login, $pass, '', $port); |
| 57 | - } |
|
| 58 | - else { |
|
| 56 | + } else { |
|
| 59 | 57 | $link = @mysqli_connect($host, $login, $pass); |
| 60 | 58 | } |
| 61 | 59 | |
@@ -543,16 +541,14 @@ discard block |
||
| 543 | 541 | if (stripos($suite, 'SELECT') !== false) { |
| 544 | 542 | if ($echappe_textes) { |
| 545 | 543 | list($suite_echap, $textes) = query_echappe_textes($suite); |
| 546 | - } |
|
| 547 | - else { |
|
| 544 | + } else { |
|
| 548 | 545 | $suite_echap = $suite; |
| 549 | 546 | } |
| 550 | 547 | if (preg_match('/^(.*?)([(]\s*SELECT\b.*)$/si', $suite_echap, $r)) { |
| 551 | 548 | $suite_echap = $r[1] . _mysql_traite_query($r[2], $db, $prefixe, false); |
| 552 | 549 | if ($echappe_textes) { |
| 553 | 550 | $suite = query_reinjecte_textes($suite_echap, $textes); |
| 554 | - } |
|
| 555 | - else { |
|
| 551 | + } else { |
|
| 556 | 552 | $suite = $suite_echap; |
| 557 | 553 | } |
| 558 | 554 | } |
@@ -1630,8 +1626,7 @@ discard block |
||
| 1630 | 1626 | if (!$type) { |
| 1631 | 1627 | if (is_bool($v)) { |
| 1632 | 1628 | return strval(intval($v)); |
| 1633 | - } |
|
| 1634 | - elseif (is_numeric($v)) { |
|
| 1629 | + } elseif (is_numeric($v)) { |
|
| 1635 | 1630 | return strval($v); |
| 1636 | 1631 | } |
| 1637 | 1632 | return "'" . addslashes($v) . "'"; |