[pLog-svn] r5425 - plog/branches/lifetype-1.2/class/net/xmlrpc
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Sat May 19 15:49:03 EDT 2007
Author: jondaley
Date: 2007-05-19 15:49:03 -0400 (Sat, 19 May 2007)
New Revision: 5425
Modified:
plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php
Log:
if blogid isn't defined, we can use the first blog the user has access to, rather than failing
Modified: plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php 2007-05-19 17:34:18 UTC (rev 5424)
+++ plog/branches/lifetype-1.2/class/net/xmlrpc/xmlrpcserver.class.php 2007-05-19 19:49:03 UTC (rev 5425)
@@ -78,7 +78,15 @@
if (!$userInfo) {
return new IXR_Error(-1, 'You did not provide the correct username and/or password');
}
-
+
+ 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( !$blogInfo ) {
return new IXR_Error(-1, 'Error loading blog' );
More information about the pLog-svn
mailing list