get rid of error message when plugin has no config options
This commit is contained in:
@ -360,6 +360,10 @@ function placement_box($name, $val, $is_plugin_editable = false, $is_event = fal
|
|||||||
function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_names, $showTable = true, $showSubmit = true, $showExample = true, $spawnNuggets = true, $postKey = 'plugin') {
|
function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_names, $showTable = true, $showSubmit = true, $showExample = true, $spawnNuggets = true, $postKey = 'plugin') {
|
||||||
global $serendipity;
|
global $serendipity;
|
||||||
|
|
||||||
|
if (empty($config_names)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ($showSubmit && $postKey != 'plugin') {
|
if ($showSubmit && $postKey != 'plugin') {
|
||||||
?>
|
?>
|
||||||
<div style="margin: 0px auto 0px 0px; text-align: right">
|
<div style="margin: 0px auto 0px 0px; text-align: right">
|
||||||
@ -375,6 +379,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
|||||||
|
|
||||||
$elcount = 0;
|
$elcount = 0;
|
||||||
$htmlnugget = array();
|
$htmlnugget = array();
|
||||||
|
|
||||||
foreach ($config_names as $config_item) {
|
foreach ($config_names as $config_item) {
|
||||||
$elcount++;
|
$elcount++;
|
||||||
$cbag = new serendipity_property_bag;
|
$cbag = new serendipity_property_bag;
|
||||||
|
Reference in New Issue
Block a user