fix missing load of media-config-item, small cleanup
This commit is contained in:
@@ -303,12 +303,10 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
|||||||
$data['postKey'] = $postKey;
|
$data['postKey'] = $postKey;
|
||||||
$data['config_item'] = $config_item;
|
$data['config_item'] = $config_item;
|
||||||
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
switch ($ctype) {
|
switch ($ctype) {
|
||||||
case 'seperator':
|
case 'seperator':
|
||||||
$data['ctype'] = 'seperator';
|
$data['ctype'] = 'seperator';
|
||||||
echo serendipity_smarty_show($tfile, $data);
|
$out_stack[$config_item] = serendipity_smarty_show($tfile, $data);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -331,7 +329,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
|||||||
$data['select_size'] = $select_size = $cbag->get('select_size');
|
$data['select_size'] = $select_size = $cbag->get('select_size');
|
||||||
$data['select'] = $select = $cbag->get('select_values');
|
$data['select'] = $select = $cbag->get('select_values');
|
||||||
|
|
||||||
echo serendipity_smarty_show($tfile, $data);
|
$out_stack[$config_item] = serendipity_smarty_show($tfile, $data);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -383,7 +381,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
|||||||
$data['radio_button'][$radio_index]['index'] = htmlspecialchars($radio['desc'][$radio_index]);
|
$data['radio_button'][$radio_index]['index'] = htmlspecialchars($radio['desc'][$radio_index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo serendipity_smarty_show($tfile, $data);
|
$out_stack[$config_item] = serendipity_smarty_show($tfile, $data);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -396,7 +394,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$data['input_type'] = $input_type;
|
$data['input_type'] = $input_type;
|
||||||
echo serendipity_smarty_show($tfile, $data);
|
$out_stack[$config_item] = serendipity_smarty_show($tfile, $data);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -416,39 +414,33 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
|||||||
}
|
}
|
||||||
serendipity_emit_htmlarea_code('nuggets', 'nuggets', true);
|
serendipity_emit_htmlarea_code('nuggets', 'nuggets', true);
|
||||||
}
|
}
|
||||||
echo serendipity_smarty_show($tfile, $data);
|
$out_stack[$config_item] = serendipity_smarty_show($tfile, $data);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'content':
|
case 'content':
|
||||||
$data['ctype'] = 'content';
|
$data['ctype'] = 'content';
|
||||||
$data['cbag_default'] = $cbag->get('default');
|
$data['cbag_default'] = $cbag->get('default');
|
||||||
echo serendipity_smarty_show($tfile, $data);
|
$out_stack[$config_item] = serendipity_smarty_show($tfile, $data);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'custom':
|
case 'custom':
|
||||||
$data['ctype'] = 'custom';
|
$data['ctype'] = 'custom';
|
||||||
$data['cbag_custom'] = $cbag->get('custom');
|
$data['cbag_custom'] = $cbag->get('custom');
|
||||||
echo serendipity_smarty_show($tfile, $data);
|
$out_stack[$config_item] = serendipity_smarty_show($tfile, $data);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'hidden':
|
case 'hidden':
|
||||||
$data['ctype'] = 'hidden';
|
$data['ctype'] = 'hidden';
|
||||||
$data['cbag_value'] = $cbag->get('value');
|
$data['cbag_value'] = $cbag->get('value');
|
||||||
echo serendipity_smarty_show($tfile, $data);
|
$out_stack[$config_item] = serendipity_smarty_show($tfile, $data);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'media':
|
case 'media':
|
||||||
$data['ctype'] = 'media';
|
$data['ctype'] = 'media';
|
||||||
// Output the JavaScript, if we haven't already
|
|
||||||
$data['mediajs_output'] = $mediajs_output = $serendipity['mediajs_output'];
|
|
||||||
if (!$mediajs_output)
|
|
||||||
{
|
|
||||||
$serendipity['mediajs_output'] = true;
|
|
||||||
}
|
|
||||||
// Print the HTML to display the popup media selector
|
// Print the HTML to display the popup media selector
|
||||||
$preview_width = $cbag->get('preview_width');
|
$preview_width = $cbag->get('preview_width');
|
||||||
if (!$preview_width || $preview_width == "") {
|
if (!$preview_width || $preview_width == "") {
|
||||||
@@ -460,8 +452,9 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
|||||||
}
|
}
|
||||||
$data['preview_width'] = $preview_width;
|
$data['preview_width'] = $preview_width;
|
||||||
$data['preview_height'] = $preview_height;
|
$data['preview_height'] = $preview_height;
|
||||||
|
$data['value'] = $value;
|
||||||
|
|
||||||
echo serendipity_smarty_show($tfile, $data);
|
$out_stack[$config_item] = serendipity_smarty_show($tfile, $data);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -588,7 +581,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
|||||||
}
|
}
|
||||||
// Print the Javascript to drag-n-drop the list
|
// Print the Javascript to drag-n-drop the list
|
||||||
// Finish the row
|
// Finish the row
|
||||||
echo serendipity_smarty_show($tfile, $data);
|
$out_stack[$config_item] = serendipity_smarty_show($tfile, $data);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -604,13 +597,14 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
|||||||
'bag' => $bag,
|
'bag' => $bag,
|
||||||
'postKey' => $postKey
|
'postKey' => $postKey
|
||||||
);
|
);
|
||||||
|
ob_start();
|
||||||
serendipity_plugin_api::hook_event('backend_pluginconfig_' . $ctype, $eventData, $addData);
|
serendipity_plugin_api::hook_event('backend_pluginconfig_' . $ctype, $eventData, $addData);
|
||||||
|
$out_stack[$config_item] = ob_get_contents();
|
||||||
|
ob_end_clean();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$out_stack[$config_item] = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
}
|
}
|
||||||
$data['config_groups'] = $config_groups;
|
$data['config_groups'] = $config_groups;
|
||||||
$data['OUT_STACK'] = $out_stack;
|
$data['OUT_STACK'] = $out_stack;
|
||||||
|
Reference in New Issue
Block a user