Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In the newly designed phpMyAdmin, how can you set the export to default to "View output as text"?

Tags:

phpmyadmin

In the newly designed phpMyAdmin (currently 3.4.2), how can you set the export to default to "View output as text" ?

This used to work but no longer does:

$cfg['Export']['asfile'] = false;

I tried these things after looking through the code of display_export.lib.php, but with no luck:

$cfg['Export']['repopulate'] = true;
$cfg['Export']['view_as_text'] = true;

Their documentation does not seem to be updated: http://wiki.phpmyadmin.net/pma/Config

Recommended Solution

Until anyone can find the "right way" to change this, I would recommend modifying this line in display_export.lib.php (currently line 328). The bold text is my addition. Also there is one parenthesis which is bolded to the right of the first set of bold items.

<li><input type="radio" id="radio_view_as_text" name="output_format" value="astext" <?php echo (!empty($cfg['Export']['view_as_text']) || isset($_GET['repopulate']) ) ? 'checked="checked"' : '' ?>/><label for="radio_view_as_text"><?php echo __('View output as text'); ?></label></li>
like image 541
cwd Avatar asked Nov 04 '22 19:11

cwd


1 Answers

$cfg['Export']['asfile'] = false;

works fine under phpMyAdmin 3.5.2.2

Restart apache after adding the above line to your phpmyadmin configuration

like image 126
000 Avatar answered Nov 09 '22 10:11

000