This repository was archived by the owner on Sep 6, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -410,6 +410,20 @@ function getGroups() {
410410 return $ groups ;
411411 }
412412
413+ // getSubgroups obtains a list of immediate subgroups.
414+ function getSubgroups () {
415+ $ mdb2 = getConnection ();
416+
417+ $ sql = "select id, name from tt_groups where org_id = $ this ->org_id and parent_id = " .$ this ->getActiveGroup ();;
418+ $ res = $ mdb2 ->query ($ sql );
419+ if (!is_a ($ res , 'PEAR_Error ' )) {
420+ while ($ val = $ res ->fetchRow ()) {
421+ $ groups [] = array ('id ' =>$ val ['id ' ],'name ' =>$ val ['name ' ]);
422+ }
423+ }
424+ return $ groups ;
425+ }
426+
413427 // getUser function is used to manage users in group and returns user details.
414428 // At the moment, the function is used for user edits and deletes.
415429 function getUser ($ user_id ) {
Original file line number Diff line number Diff line change 1212 <br >
1313 <table cellspacing =" 0" cellpadding =" 4" width =" 100%" border =" 0" >
1414 <tr >
15- <td align =" center" >  ; Anuko Time Tracker 1.18.25.4477 | Copyright © ; <a href =" https://www.anuko.com/lp/tt_3.htm" target =" _blank" >Anuko</a > |
15+ <td align =" center" >  ; Anuko Time Tracker 1.18.25.4478 | Copyright © ; <a href =" https://www.anuko.com/lp/tt_3.htm" target =" _blank" >Anuko</a > |
1616 <a href =" https://www.anuko.com/lp/tt_4.htm" target =" _blank" >{ $i18n .footer.credits} </a > |
1717 <a href =" https://www.anuko.com/lp/tt_5.htm" target =" _blank" >{ $i18n .footer.license} </a > |
1818 <a href =" https://www.anuko.com/lp/tt_7.htm" target =" _blank" >{ $i18n .footer.improve} </a >
Original file line number Diff line number Diff line change @@ -41,6 +41,14 @@ function handleTaskRequiredCheckbox() {
4141 <td ><a href =" roles.php" >{ $i18n .label.configure} </a ></td >
4242 </tr >
4343 { /if }
44+ { if $smarty .const.SUBGROUP_DEBUG == ' true' }
45+ { if $user -> can (' manage_subgroups' )}
46+ <tr >
47+ <td align =" right" nowrap >{ $i18n .label.subgroups} :</td >
48+ <td ><a href =" groups.php" >{ $i18n .label.configure} </a ></td >
49+ </tr >
50+ { /if }
51+ { /if }
4452 <tr >
4553 <td align =" right" nowrap >{ $i18n .label.language} :</td >
4654 <td >{ $forms .groupForm.lang.control} </td >
Original file line number Diff line number Diff line change 3939}
4040// End of access checks.
4141
42- $ smarty ->assign ('groups ' , $ user ->getGroups ());
43- $ smarty ->assign ('title ' , $ i18n ->get ('title.groups ' ));
42+ $ smarty ->assign ('groups ' , $ user ->getSubgroups ());
43+ $ smarty ->assign ('title ' , $ i18n ->get ('label.subgroups ' ));
4444$ smarty ->assign ('content_page_name ' , 'groups.tpl ' );
4545$ smarty ->display ('index.tpl ' );
You can’t perform that action at this time.
0 commit comments