diff --git a/libraries/plugin_interface.lib.php b/libraries/plugin_interface.lib.php
index b78d32f80..3883256a9 100644
--- a/libraries/plugin_interface.lib.php
+++ b/libraries/plugin_interface.lib.php
@@ -142,37 +142,44 @@ function PMA_pluginIsActive($section, $opt, $val)
/**
* string PMA_pluginGetChoice(string $section, string $name, array &$list, string $cfgname)
*
- * returns html radio form element for plugin choice
+ * returns html select form element for plugin choice
+ * and hidden fields denoting whether each plugin must be exported as a file
*
- * @uses PMA_pluginIsActive()
+ * @uses PMA_pluginGetDefault()
* @uses PMA_getString()
* @param string $section name of config section in
* $GLOBALS['cfg'][$section] for plugin
- * @param string $name name of radio element
+ * @param string $name name of select 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
+ * @return string html select tag
*/
function PMA_pluginGetChoice($section, $name, &$list, $cfgname = NULL)
{
if (!isset($cfgname)) {
$cfgname = $name;
}
- $ret = '';
+ $ret = '' . "\n";
+
+ // Whether each plugin has to be saved as a file
+ foreach ($list as $plugin_name => $val) {
+ $ret .= ''. "\n";
}
return $ret;
}
@@ -180,7 +187,7 @@ function PMA_pluginGetChoice($section, $name, &$list, $cfgname = NULL)
/**
* string PMA_pluginGetOneOption(string $section, string $plugin_name, string $id, array &$opt)
*
- * returns single option in a table row
+ * returns single option in a list element
*
* @uses PMA_getString()
* @uses PMA_pluginCheckboxCheck()
@@ -196,7 +203,7 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
{
$ret = "\n";
if ($opt['type'] == 'bool') {
- $ret .= '
';
+ } elseif ($opt['type'] == 'begin_subgroup') {
+ /* each subgroup can have a header, which may also be a form element */
+ $ret .= PMA_pluginGetOneOption($section, $plugin_name, $id, $opt['subgroup_header']) . '
';
} else {
/* This should be seen only by plugin writers, so I do not thing this
* needs translation. */
@@ -279,6 +279,7 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
$ret .= PMA_showMySQLDocu($opt['doc'][0], $opt['doc'][1]);
}
}
+
$ret .= "\n";
return $ret;
}
@@ -286,10 +287,11 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
/**
* string PMA_pluginGetOptions(string $section, array &$list)
*
- * return html fieldset with editable options for plugin
+ * return html div with editable options for plugin
*
* @uses PMA_getString()
* @uses PMA_pluginGetOneOption()
+ * @uses PMA_pluginGetDefault();
* @param string $section name of config section in $GLOBALS['cfg'][$section]
* @param array &$list array with plugin configuration defined in plugin file
* @return string html fieldset with plugin options
@@ -297,10 +299,14 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
function PMA_pluginGetOptions($section, &$list)
{
$ret = '';
+ $default = PMA_pluginGetDefault('Export', 'format');
// Options for plugins that support them
foreach ($list as $plugin_name => $val) {
- $ret .= '