[geeklog-cvs] Geeklog-2/system/Propel/Geeklog-2 Gl2User.php,1.3,1.4

vinny at iowaoutdoors.org vinny at iowaoutdoors.org
Wed Dec 29 14:17:17 EST 2004


Update of /var/cvs/Geeklog-2/system/Propel/Geeklog-2
In directory www:/tmp/cvs-serv1269/d/d

Modified Files:
	Gl2User.php 
Log Message:
Updated $user->getGroups() to use DAO instead of Propel Criteria


Index: Gl2User.php
===================================================================
RCS file: /var/cvs/Geeklog-2/system/Propel/Geeklog-2/Gl2User.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Gl2User.php	29 Dec 2004 05:18:23 -0000	1.3
--- Gl2User.php	29 Dec 2004 19:17:14 -0000	1.4
***************
*** 39,48 ****
              }
  
              //Fetch subgroups recursively
              while ( sizeof($ngroups) > 0 ) ) {
                  //Get the subgroups of the current group list
!                 $c = new Criteria();
!                 $c->add(Gl2GroupAssignmentPeer::ASSIGNED_GROUP_ID, $ngroups, Criteria::IN);
!                 $groups = Gl2GroupAssignmentPeer::doSelect($c);
                  //Get the group ids for the fetched groups
                  foreach ($groups as $group) {
--- 39,50 ----
              }
  
+             // Include DAO class and get an instance 
+             require_once 'DataAccess/DAO.php';
+             $dao = &Geeklog_DAO::singleton();
+ 
              //Fetch subgroups recursively
              while ( sizeof($ngroups) > 0 ) ) {
                  //Get the subgroups of the current group list
!                 $groups = $dao->find('getGroupsSubs', $ngroups);
                  //Get the group ids for the fetched groups
                  foreach ($groups as $group) {




More information about the geeklog-cvs mailing list