[pLog-svn] r6317 - plog/branches/lifetype-1.2/class/dao

mark at devel.lifetype.net mark at devel.lifetype.net
Thu Apr 24 12:11:05 EDT 2008


Author: mark
Date: 2008-04-24 12:11:05 -0400 (Thu, 24 Apr 2008)
New Revision: 6317

Modified:
   plog/branches/lifetype-1.2/class/dao/userpermissions.class.php
Log:
It is a serious bug, but no one complain it. It will cause the permission model wrong when user upgrade from lifetype 1.1 to 1.2 if one user has multiple blogs.

It also cause some permission errors in 1.2 with fresh installation.

Modified: plog/branches/lifetype-1.2/class/dao/userpermissions.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/userpermissions.class.php	2008-04-22 08:13:54 UTC (rev 6316)
+++ plog/branches/lifetype-1.2/class/dao/userpermissions.class.php	2008-04-24 16:11:05 UTC (rev 6317)
@@ -63,7 +63,7 @@
         function grantPermission( &$perm, $doNotCleanCache = false )
         {
             // check if the permission has already been granted
-			$userPerms = $this->getUserPermissions( $perm->getUserId(), $perm->getUserId());
+			$userPerms = $this->getUserPermissions( $perm->getUserId(), $perm->getBlogId());
 			$found = false;
 			foreach( $userPerms as $userPerm ) {
 				if( $userPerm->getUserId() == $perm->getUserId() && $userPerm->getBlogId() == $perm->getBlogId() && 



More information about the pLog-svn mailing list