[ php-blog-Bugs-2815275 ] Bugfix in serendipity_event_xmlrpc.php setPostCategories

"SourceForge.net" <[email protected]> Wed, 01 Jul 2009 15:36:50 +0000
Newsgroups gmane.comp.serendipity.trackers
Message-ID <[email protected]>
Bugs item #2815275, was opened at 2009-07-01 17:36
Message generated for change (Tracker Item Submitted) made by patk
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=542822&aid=2815275&group_id=75065

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Plugins
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Patrick Mevzek (patk)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bugfix in serendipity_event_xmlrpc.php setPostCategories

Initial Comment:
I'm using the XMLRPC plugin as well as the sitemap generator.
When using setPostCategories, I get back output from the sitemap generator plugin it seems prepended to the correct XML reply, but this makes the client (Net::MovableType Perl module used to post through XMLRPC) barf.

This simple fix corrects the problem:
--- serendipity_xmlrpc.inc.php.orig	2009-07-01 04:49:46.000000000 +0200
+++ serendipity_xmlrpc.inc.php	2009-07-01 04:56:00.000000000 +0200
@@ -646,8 +646,10 @@
 
     if ($entry['id']) {
         $entry['categories'] = $category_ids;
+        ob_start();
         universal_fixEntry($entry);
         $entry = serendipity_updertEntry($entry);
+        ob_clean();
         return new XML_RPC_Response(new XML_RPC_Value(true, 'boolean'));
     } else {
         return new XML_RPC_Response(new XML_RPC_Value(false, 'boolean'));


This is already done like that in various other parts of the XMLRPC plugin.
There may be other parts needing also such an update, but I'm only using newPost and setPostCategories.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=542822&aid=2815275&group_id=75065

------------------------------------------------------------------------------