2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * @package phpMyAdmin-Transformation
7 function PMA_transformation_application_octetstream__download_info() {
9 'info' => __('Displays a link to download the binary data of the column. You can use the first option to specify the filename, or use the second option as the name of a column which contains the filename. If you use the second option, you need to set the first option to the empty string.'),
16 function PMA_transformation_application_octetstream__download(&$buffer, $options = array(), $meta = '') {
17 global $row, $fields_meta;
19 if (isset($options[0]) && !empty($options[0])) {
20 $cn = $options[0]; // filename
22 if (isset($options[1]) && !empty($options[1])) {
23 foreach($fields_meta as $key => $val) {
24 if ($val->name
== $options[1]) {
34 $cn = 'binary_file.dat';
40 '<a href="transformation_wrapper.php%s&ct=application/octet-stream&cn=%s" title="%s">%s</a>',
42 $options['wrapper_link'],
44 htmlspecialchars($cn),