1
0

show_plugin_config: use return instead of echo

This commit is contained in:
onli
2013-06-21 12:28:43 +02:00
parent 6aa0f69ce0
commit 342d8676bf
3 changed files with 39 additions and 51 deletions

View File

@@ -149,10 +149,7 @@ if (isset($_GET['serendipity']['plugin_to_conf'])) {
}
$data['license'] = $license;
ob_start();
serendipity_plugin_config($plugin, $bag, $name, $desc, $config_names, true, true, true, true, 'plugin', $config_groups);
$data['config'] = ob_get_contents();
ob_end_clean();
$data['config'] = serendipity_plugin_config($plugin, $bag, $name, $desc, $config_names, true, true, true, true, 'plugin', $config_groups);
} elseif ( $serendipity['GET']['adminAction'] == 'addnew' ) {
$data['adminAction'] = 'addnew';

View File

@@ -128,8 +128,7 @@ if (is_array($template_config)) {
$template_options->import($template_config);
$template_options->values =& $template_vars;
ob_start();
serendipity_plugin_config(
$data["configuration"] = serendipity_plugin_config(
$template_options,
$template_vars,
$serendipity['template'],
@@ -142,8 +141,6 @@ if (is_array($template_config)) {
'template',
$template_config_groups
);
$data["configuration"] = ob_get_contents();
ob_end_clean();
serendipity_plugin_api::hook_event('backend_templates_configuration_bottom', $template_config);
} else {
@@ -190,10 +187,6 @@ if (is_array($template_config)) {
/* TODO: Smarty versioncheck */
}
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init();
}
echo serendipity_smarty_show('admin/templates.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@@ -224,7 +224,7 @@ function show_plugins($event_only = false, $sidebars = null)
* @param boolean Spawn a plugins' configuration WYSIWYG items?
* @param string The array index name of POSTed values ($serendipity['POST'][xxx])
* @param array An array that groups certain config keys
* @return boolean
* @return string The configuration HTML
*/
function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_names, $showTable = true, $showSubmit = true, $showExample = true, $spawnNuggets = true, $postKey = 'plugin', $config_groups = NULL) {
global $serendipity;
@@ -647,7 +647,5 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$data['ev'] = $ev;
}
echo serendipity_smarty_show('admin/plugin_config.tpl', $data);
return true;
return serendipity_smarty_show('admin/plugin_config.tpl', $data);
}