2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * @package phpMyAdmin-Transformation
7 function PMA_transformation_application_octetstream__download_info()
10 '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.'),
17 function PMA_transformation_application_octetstream__download(&$buffer, $options = array(), $meta = '')
19 global $row, $fields_meta;
21 if (isset($options[0]) && !empty($options[0])) {
22 $cn = $options[0]; // filename
24 if (isset($options[1]) && !empty($options[1])) {
25 foreach ($fields_meta as $key => $val) {
26 if ($val->name
== $options[1]) {
36 $cn = 'binary_file.dat';
42 '<a href="transformation_wrapper.php%s&ct=application/octet-stream&cn=%s" title="%s">%s</a>',
44 $options['wrapper_link'],
46 htmlspecialchars($cn),