[pLog-svn] r6845 - plog/branches/lifetype-1.2/class/net/xmlrpc

pwestbro at devel.lifetype.net pwestbro at devel.lifetype.net
Mon Mar 23 19:05:23 EDT 2009


Author: pwestbro
Date: 2009-03-23 19:05:23 -0400 (Mon, 23 Mar 2009)
New Revision: 6845

Modified:
   plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php
Log:
Fixed a bug where LoudTwitter would not work with LifeType.

The metaWebNewPost was did not have the fix that newPost to get the first
blog that is associated with the specified, when blogId was not specified.


Modified: plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php	2009-03-09 05:44:18 UTC (rev 6844)
+++ plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php	2009-03-23 23:05:23 UTC (rev 6845)
@@ -211,6 +211,14 @@
                 $status = POST_STATUS_DRAFT;
             }
 
+            if(!$blogid){
+                $blogs = $userInfo->getBlogs();
+                if(!$blogs){
+                    return new IXR_Error(-1, "This user doesn't have access to any blogs.");
+                }
+                $blogid = $blogs[0]->getId();
+            }
+
             $blogInfo = $blogsG->getBlogInfo( $blogid );
             if( !$this->userHasPermission( $userInfo, $blogInfo, "add_post" )) {
                 return new IXR_Error(-1, 'This user does not have enough permissions' );
@@ -1292,4 +1300,4 @@
 		}	
 
 	}
-?>
\ No newline at end of file
+?>



More information about the pLog-svn mailing list