Fix selecting of default export.

This commit is contained in:
Michal Čihař
2006-04-26 16:55:12 +00:00
parent b3d0d7622e
commit 19d0390e8c
2 changed files with 9 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ echo PMA_pluginGetJavascript($export_list);
<legend><?php echo $export_page_title; ?></legend>
<?php
/*
/*
* this table is needed to fix rendering in Opera <= 9 and Safari <= 2
* normaly just the two fieldset would have float: left
*/
@@ -72,7 +72,7 @@ echo PMA_pluginGetJavascript($export_list);
<div id="div_container_exportoptions">
<fieldset id="exportoptions">
<?php echo PMA_pluginGetChoice('Export', 'what', $export_list); ?>
<?php echo PMA_pluginGetChoice('Export', 'what', $export_list, 'format'); ?>
</fieldset>
</div>

View File

@@ -135,7 +135,7 @@ function PMA_pluginIsActive($section, $opt, $val)
}
/**
* string PMA_pluginGetChoice(string $section, string $name, array &$list)
* string PMA_pluginGetChoice(string $section, string $name, array &$list, string $cfgname)
*
* returns html radio form element for plugin choice
*
@@ -145,10 +145,14 @@ function PMA_pluginIsActive($section, $opt, $val)
* $GLOBALS['cfg'][$section] for plugin
* @param string $name name of radio element
* @param array &$list array with plugin configuration defined in plugin file
* @param string $cfgname name of config value, if none same as $name
* @return string html input radio tag
*/
function PMA_pluginGetChoice($section, $name, &$list)
function PMA_pluginGetChoice($section, $name, &$list, $cfgname = NULL)
{
if (!isset($cfgname)) {
$cfgname = $name;
}
$ret = '';
foreach ($list as $plugin_name => $val) {
$ret .= '<!-- ' . $plugin_name . ' -->' . "\n";
@@ -157,7 +161,7 @@ function PMA_pluginGetChoice($section, $name, &$list)
. ' onclick="if(this.checked) { hide_them_all();'
.' document.getElementById(\'' . $plugin_name . '_options\').style.display = \'block\'; };'
.' return true"'
. PMA_pluginIsActive($section, $name, $plugin_name) . '/>' . "\n";
. PMA_pluginIsActive($section, $cfgname, $plugin_name) . '/>' . "\n";
$ret .= '<label for="radio_plugin_' . $plugin_name . '">'
. PMA_getString($val['text']) . '</label>' . "\n";
$ret .= '<br /><br />' . "\n";