]> git.mjollnir.org Git - s9y.git/commitdiff
Fix int conversion, wrong $postid.
authorgarvinhicking <garvinhicking>
Thu, 4 Aug 2005 11:59:23 +0000 (11:59 +0000)
committergarvinhicking <garvinhicking>
Thu, 4 Aug 2005 11:59:23 +0000 (11:59 +0000)
serendipity_xmlrpc.php

index 05e9bb321d5a434c44a517adcdb2c2bc1bc04cde..c17fa0f1f8f14ad76beb3ea8ea7623ccea021453 100644 (file)
@@ -431,8 +431,8 @@ function metaWeblog_getPost($message) {
         'permalink'         => new XML_RPC_Value(serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL', true, array('timestamp' => $entry['timestamp'])), 'string'),
         'mt_excerpt'        => new XML_RPC_Value($entry['excerpt'], 'string'),
         'mt_text_more'      => new XML_RPC_Value($entry['extended'], 'string'),
-        'mt_allow_comments' => new XML_RPC_Value($entry['allow_comments'], 'int'),
-        'mt_allow_pings'    => new XML_RPC_Value($entry['mt_allow_pings'], 'int'),
+        'mt_allow_comments' => new XML_RPC_Value(($entry['allow_comments'] == true ? 1 : 0), 'int'),
+        'mt_allow_pings'    => new XML_RPC_Value(($entry['mt_allow_pings'] == true ? 1 : 0), 'int'),
         'mt_convert_breaks' => new XML_RPC_Value($entry['mt_convert_breaks'], 'string'),
         'mt_keywords'       => new XML_RPC_Value($entry['mt_keywords'], 'string')), 'struct');
 
@@ -560,8 +560,8 @@ function universal_setEntry(&$entry, &$tmp) {
         'mt_convert_breaks' => new XML_RPC_Value('', 'string'),
         'mt_keywords'       => new XML_RPC_Value('', 'string'),
         'title'             => new XML_RPC_Value($entry['title'],'string'),
-        'permalink'         => new XML_RPC_Value(serendipity_rewriteURL(PATH_ARCHIVES.'/' . $postid . '_.html', 'baseURL'), 'string'),
-        'link'              => new XML_RPC_Value(serendipity_rewriteURL(PATH_ARCHIVES.'/' . $postid . '_.html', 'baseURL'), 'string'),
+        'permalink'         => new XML_RPC_Value(serendipity_rewriteURL(PATH_ARCHIVES.'/' . $entry['id']. '_.html', 'baseURL'), 'string'),
+        'link'              => new XML_RPC_Value(serendipity_rewriteURL(PATH_ARCHIVES.'/' . $entry['id'] . '_.html', 'baseURL'), 'string'),
     );
 
     return array_merge($entry, $tmp);