function icl_troubleshooting_dumpdb()
{
    ini_set('memory_limit', '128M');
    $dump = _icl_ts_mysqldump(DB_NAME);
    $gzdump = gzencode($dump, 9);
    header("Content-Type: application/force-download");
    header("Content-Type: application/octet-stream");
    header("Content-Type: application/download");
    header("Content-Disposition: attachment; filename=" . DB_NAME . ".sql.gz");
    //header("Content-Encoding: gzip");
    header("Content-Length: " . strlen($gzdump));
    echo $gzdump;
}
function icl_troubleshooting_dumpdb()
{
    if ($_GET['nonce'] == wp_create_nonce('dbdump') && is_admin() && current_user_can('manage_options')) {
        ini_set('memory_limit', '128M');
        $dump = _icl_ts_mysqldump(DB_NAME);
        $gzdump = gzencode($dump, 9);
        header("Content-Type: application/force-download");
        header("Content-Type: application/octet-stream");
        header("Content-Type: application/download");
        header("Content-Disposition: attachment; filename=" . DB_NAME . ".sql.gz");
        //header("Content-Encoding: gzip");
        header("Content-Length: " . strlen($gzdump));
        echo $gzdump;
        exit;
    }
}