Update of /cvsroot/php-blog/serendipity/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3272
Modified Files:
plugin_api.inc.php plugin_internal.inc.php
Log Message:
- Unbreak plugin administration: PHP died when attempting to load a plugin that used smarty
This also provides a valuable optimization, as we do not call generate_content twice for each plugin (stupid)
- Unbreak HTML nugget to allow empty titles
Index: plugin_internal.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/plugin_internal.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- plugin_internal.inc.php 19 Nov 2004 11:24:51 -0000 1.3
+++ plugin_internal.inc.php 20 Nov 2004 01:38:06 -0000 1.4
@@ -894,7 +894,7 @@
{
global $serendipity;
- $title = $this->get_config('title', $this->title);
+ $title = $this->get_config('title');
$show_where = $this->get_config('show_where', 'both');
if ($show_where == 'extended' && (!isset($serendipity['GET']['id']) || !is_numeric($serendipity['GET']['id']))) {
@@ -985,4 +985,4 @@
}
/* vim: set sts=4 ts=4 expandtab : */
-?>
\ No newline at end of file
+?>
Index: plugin_api.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/plugin_api.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- plugin_api.inc.php 19 Nov 2004 11:05:31 -0000 1.2
+++ plugin_api.inc.php 20 Nov 2004 01:38:06 -0000 1.3
@@ -377,16 +377,7 @@
{
global $serendipity;
- // Generate plugin output. Make sure that by probing the plugin, no events are actually called. After that,
- // restore setting of 'no_events'.
-
- $ne = (isset($serendipity['no_events']) && $serendipity['no_events'] ? TRUE : FALSE);
- $serendipity['no_events'] = TRUE;
- ob_start();
- $plugin->generate_content($title);
- ob_end_clean();
- $serendipity['no_events'] = $ne;
-
+ $title = $plugin->get_config('title');
if (strlen(trim($title)) == 0) {
if (!empty($default_title)) {
$title = $default_title;
|