// (we are inserting) // loic1: display default values if (!isset($field['Default'])) { $field['Default'] = ''; $real_null_value = TRUE; $data = ''; } else { $data = $field['Default']; } if ($field['True_Type'] == 'bit') { $special_chars = PMA_convert_bit_default_value($field['Default']); } else { $special_chars = htmlspecialchars($field['Default']); } $backup_field = ''; $special_chars_encoded = PMA_duplicateFirstNewline($special_chars); // this will select the UNHEX function while inserting if (($field['is_binary'] || $field['is_blob'] && !$cfg['ProtectBinary']) && $_SESSION['tmp_user_values']['display_binary_as_hex'] && $cfg['ShowFunctionFields']) { $field['display_binary_as_hex'] = true; } } $idindex = $o_rows * $fields_cnt + $i + 1; $tabindex = ($idindex - 1) * 3 + 1; // The function column // ------------------- // Change by Bernard M. Piller <*****@*****.**> // We don't want binary data to be destroyed // Note: from the MySQL manual: "BINARY doesn't affect how the column is // stored or retrieved" so it does not mean that the contents is // binary if ($cfg['ShowFunctionFields']) {
/** * duplicate first newline test * @dataProvider duplicateFirstNewlineDataProvider */ public function testDuplicateFirstNewline($a, $e) { $this->assertEquals($e, PMA_duplicateFirstNewline($a)); }