Note: this list is kept only as a demonstration for CVSNotice. For the latest CVS notices, see the Xaraya and Postnuke sites
View Statistics - Next Notice - Previous NoticeDirectory filter : [ all ] / postnuke_official / html / modules / groups [ view in CVS ]
Date | Directory [filter] | File(s) [view] | Author [filter] |
07 Aug 2002 03:54:18 | postnuke_official/html/modules/groups | pnadminapi.php,1.16,1.17 | st.ego |
extracted adminapi_viewallgroups to userapi_getall |
Update of /home/cvsroot/postnuke_official/html/modules/groups In directory ns7.hostnuke.net:/tmp/cvs-serv24593/html/modules/groups Modified Files: pnadminapi.php Log Message: extracted adminapi_viewallgroups to userapi_getall extracted adminapi_viewgroup to userapi_get left orig calls in but they now redir to the userapi functions Index: pnadminapi.php =================================================================== RCS file: /home/cvsroot/postnuke_official/html/modules/groups/pnadminapi.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** pnadminapi.php 8 Jul 2002 02:02:00 -0000 1.16 --- pnadminapi.php 7 Aug 2002 03:54:16 -0000 1.17 *************** *** 76,109 **** function groups_adminapi_viewallgroups() { ! list($dbconn) = pnDBGetConn(); ! $pntable = pnDBGetTables(); ! ! $groupstable = $pntable['groups']; ! ! if (!pnSecAuthAction(0, 'Groups::', "::", ACCESS_EDIT)) { ! pnSessionSetVar('errormsg', _GROUPSNOAUTH); ! return false; ! } ! ! $groups = array(); ! ! // Get and display current groups ! $query = "SELECT pn_gid, ! pn_name ! FROM $groupstable ! ORDER BY pn_name"; ! $result = $dbconn->Execute($query); ! ! if($dbconn->ErrorNo() !=0) { ! pnSessionSetVar('errormsg', 'Error getting groups.'); ! return false; ! } ! for(; !$result->EOF; $result->MoveNext()) { ! list($gid, $name) = $result->fields; ! ! $groups[] = array('gid' => $gid, ! 'name' => $name); ! } ! $result->Close(); return $groups; --- 76,80 ---- function groups_adminapi_viewallgroups() { ! $groups = pnModAPIFunc('groups','user','getall'); return $groups; *************** *** 204,247 **** function groups_adminapi_viewgroup($args) { ! extract($args); ! ! if(!isset($gid)) { ! pnSessionSetVar('errormsg', _MODARGSERROR); ! return false; ! } ! list($dbconn) = pnDBGetConn(); ! $pntable = pnDBGetTables(); ! ! $userstable = $pntable['users']; ! $groupmembership = $pntable['group_membership']; ! ! $users = array(); ! // Get users in this group ! $query = "SELECT pn_uid ! FROM $groupmembership ! WHERE pn_gid=".pnVarPrepForStore($gid).""; ! $result = $dbconn->Execute($query); ! if (!$result->EOF) { ! for(;list($uid) = $result->fields;$result->MoveNext() ) { ! $uids[] = $uid; ! } ! $result->Close(); ! $uidlist=implode(",", $uids); ! ! // Get names of users ! $query = "SELECT pn_uname, ! pn_uid ! FROM $userstable ! WHERE pn_uid IN ($uidlist) ! ORDER BY pn_uname"; ! $result = $dbconn->Execute($query); - while(list($uname, $uid) = $result->fields) { - $result->MoveNext(); - $users[] = array('uname' => $uname, - 'uid' => $uid); - } - $result->Close(); - } return $users; } --- 175,180 ---- function groups_adminapi_viewgroup($args) { ! $users = pnModAPIFunc('groups','user','get'); return $users; }
View Statistics - Next Notice - Previous Notice
Visit Developer Site - Browse CVS Repository |
Syndicate via backend.rss (max. once per hour please) | Powered by CVSNotice 0.1.3 |