|
@@ 758-781 (lines=24) @@
|
| 755 |
|
|
| 756 |
|
$host = DB_HOST; |
| 757 |
|
|
| 758 |
|
if ( ! empty( $port_or_socket ) ) { |
| 759 |
|
|
| 760 |
|
$host = substr( DB_HOST, 0, strpos( DB_HOST, ':' ) ); |
| 761 |
|
|
| 762 |
|
$port_or_socket = substr( $port_or_socket, 1 ); |
| 763 |
|
|
| 764 |
|
if ( 0 !== strpos( $port_or_socket, '/' ) ) { |
| 765 |
|
|
| 766 |
|
$port = intval( $port_or_socket ); |
| 767 |
|
|
| 768 |
|
$maybe_socket = strstr( $port_or_socket, ':' ); |
| 769 |
|
|
| 770 |
|
if ( ! empty( $maybe_socket ) ) { |
| 771 |
|
|
| 772 |
|
$socket = substr( $maybe_socket, 1 ); |
| 773 |
|
|
| 774 |
|
} |
| 775 |
|
|
| 776 |
|
} else { |
| 777 |
|
|
| 778 |
|
$socket = $port_or_socket; |
| 779 |
|
|
| 780 |
|
} |
| 781 |
|
} |
| 782 |
|
|
| 783 |
|
// Path to the mysqldump executable |
| 784 |
|
$cmd = escapeshellarg( $this->get_mysqldump_command_path() ); |
|
@@ 860-883 (lines=24) @@
|
| 857 |
|
|
| 858 |
|
$host = DB_HOST; |
| 859 |
|
|
| 860 |
|
if ( ! empty( $port_or_socket ) ) { |
| 861 |
|
|
| 862 |
|
$host = substr( DB_HOST, 0, strpos( DB_HOST, ':' ) ); |
| 863 |
|
|
| 864 |
|
$port_or_socket = substr( $port_or_socket, 1 ); |
| 865 |
|
|
| 866 |
|
if ( 0 !== strpos( $port_or_socket, '/' ) ) { |
| 867 |
|
|
| 868 |
|
$port = intval( $port_or_socket ); |
| 869 |
|
|
| 870 |
|
$maybe_socket = strstr( $port_or_socket, ':' ); |
| 871 |
|
|
| 872 |
|
if ( ! empty( $maybe_socket ) ) { |
| 873 |
|
|
| 874 |
|
$socket = substr( $maybe_socket, 1 ); |
| 875 |
|
|
| 876 |
|
} |
| 877 |
|
|
| 878 |
|
} else { |
| 879 |
|
|
| 880 |
|
$socket = $port_or_socket; |
| 881 |
|
|
| 882 |
|
} |
| 883 |
|
} |
| 884 |
|
|
| 885 |
|
// PDO connection string formats: |
| 886 |
|
// mysql:host=localhost;port=3307;dbname=testdb |
|
@@ 1499-1522 (lines=24) @@
|
| 1496 |
|
|
| 1497 |
|
$host = DB_HOST; |
| 1498 |
|
|
| 1499 |
|
if ( ! empty( $port_or_socket ) ) { |
| 1500 |
|
|
| 1501 |
|
$host = substr( DB_HOST, 0, strpos( DB_HOST, ':' ) ); |
| 1502 |
|
|
| 1503 |
|
$port_or_socket = substr( $port_or_socket, 1 ); |
| 1504 |
|
|
| 1505 |
|
if ( 0 !== strpos( $port_or_socket, '/' ) ) { |
| 1506 |
|
|
| 1507 |
|
$port = intval( $port_or_socket ); |
| 1508 |
|
|
| 1509 |
|
$maybe_socket = strstr( $port_or_socket, ':' ); |
| 1510 |
|
|
| 1511 |
|
if ( ! empty( $maybe_socket ) ) { |
| 1512 |
|
|
| 1513 |
|
$socket = substr( $maybe_socket, 1 ); |
| 1514 |
|
|
| 1515 |
|
} |
| 1516 |
|
|
| 1517 |
|
} else { |
| 1518 |
|
|
| 1519 |
|
$socket = $port_or_socket; |
| 1520 |
|
|
| 1521 |
|
} |
| 1522 |
|
} |
| 1523 |
|
|
| 1524 |
|
// Path to the mysqldump executable |
| 1525 |
|
$cmd = 'mysql '; |