Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10667
Modified Files:
serendipity_admin_plugins.inc.php
serendipity_sidebar_items.php
Log Message:
* improve HTML nugget title detection
* fix redirection to plugin configuration: Can't use Header() because output
is already sent before we get to the plugin insertion.
* fix empty plugin names if $title has not yet been configured. uses plugin
name with square brackets around the name to indicate this
Index: serendipity_sidebar_items.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- serendipity_sidebar_items.php 16 Jun 2004 16:41:49 -0000 1.63
+++ serendipity_sidebar_items.php 17 Jun 2004 20:30:18 -0000 1.64
@@ -515,11 +515,7 @@
function generate_content(&$title)
{
- $title = $this->get_config('title', $title);
- // In case we have a nugget without a title
- if ( empty($title) ) {
- $title = HTML_NUGGET;
- }
+ $title = $this->get_config('title', HTML_NUGGET);
if ($this->get_config('markup', 'true') == 'true') {
$entry = array('html_nugget' => $this->get_config('content'));
serendipity_plugin_api::hook_event('frontend_display', $entry);
Index: serendipity_admin_plugins.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_plugins.inc.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- serendipity_admin_plugins.inc.php 15 Jun 2004 22:03:15 -0000 1.30
+++ serendipity_admin_plugins.inc.php 17 Jun 2004 20:30:17 -0000 1.31
@@ -135,7 +135,7 @@
$place = placement_box('serendipity[placement][' . $plugin_data['name'] . ']', $plugin_data['placement']);
}
- $title = serendipity_plugin_api::get_plugin_title($plugin, ' ');
+ $title = serendipity_plugin_api::get_plugin_title($plugin, '[' . $name . ']');
if ($bag->is_set('configuration') && ($plugin->protected === FALSE || $plugin_data['authorid'] == '0' || $plugin_data['authorid'] == $serendipity['authorid'] || $serendipity['serendipityUserlevel'] >= USERLEVEL_ADMIN)) {
$url = '?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . $key;
@@ -528,8 +528,8 @@
$plugin->introspect($bag);
/* Only play with the plugin if there is something to play with */
- if ( $bag->is_set('configuration') ) {
- header('Location: '. $serendipity['baseurl'] .'?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . $inst);
+ if ($bag->is_set('configuration')) {
+ echo '<script type="text/javascript">location.href = \'' . $serendipity['baseurl'] . '?serendipity[adminModule]=plugins&serendipity[plugin_to_conf]=' . $inst . '\';</script>';
die();
}
}
|