[pLog-svn] r4182 - plog/trunk/class/dao/userdata
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Tue Oct 24 21:49:51 GMT 2006
Author: oscar
Date: 2006-10-24 21:49:50 +0000 (Tue, 24 Oct 2006)
New Revision: 4182
Modified:
plog/trunk/class/dao/userdata/baseuserdataprovider.class.php
Log:
fixed an issue with getUsersBlogs()
Modified: plog/trunk/class/dao/userdata/baseuserdataprovider.class.php
===================================================================
--- plog/trunk/class/dao/userdata/baseuserdataprovider.class.php 2006-10-24 21:39:21 UTC (rev 4181)
+++ plog/trunk/class/dao/userdata/baseuserdataprovider.class.php 2006-10-24 21:49:50 UTC (rev 4182)
@@ -113,7 +113,7 @@
$result->Close();
// and now check to which other blogs he or she belongs
- $otherBlogs = "SELECT b.* FROM {$prefix}blogs b, {$prefix}users_permissions p
+ $otherBlogs = "SELECT DISTINCT p.blog_id AS blog_id FROM {$prefix}users_permissions p, {$prefix}blogs b
WHERE p.user_id = '".Db::qstr($userid)."' AND b.id = p.blog_id";
if( !empty($usersBlogs)) {
$blogIds = implode( ",", $ids );
@@ -126,7 +126,8 @@
// now we know to which he or she belongs, so we only have
// to load the information about those blogs
while( $row = $result->FetchRow($result)) {
- $usersBlogs[] = $blogs->mapRow( $row );
+ $id = $row["blog_id"];
+ $usersBlogs[] = $blogs->getBlogInfo( $id );
}
$result->Close();
More information about the pLog-svn
mailing list