projects
/
timetracker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94737b9
)
Wrote ttGroupHelper::getGroupAttrs function.
author
Nik Okuntseff
<support@anuko.com>
Fri, 23 Nov 2018 12:26:28 +0000
(12:26 +0000)
committer
Nik Okuntseff
<support@anuko.com>
Fri, 23 Nov 2018 12:26:28 +0000
(12:26 +0000)
WEB-INF/lib/ttGroupHelper.class.php
patch
|
blob
|
history
diff --git
a/WEB-INF/lib/ttGroupHelper.class.php
b/WEB-INF/lib/ttGroupHelper.class.php
index
a6d5fea
..
21e62a6
100644
(file)
--- a/
WEB-INF/lib/ttGroupHelper.class.php
+++ b/
WEB-INF/lib/ttGroupHelper.class.php
@@
-205,4
+205,18
@@
class ttGroupHelper {
$affected = $mdb2->exec($sql);
return (!is_a($affected, 'PEAR_Error'));
}
+
+ // getGroupAttrs obtains all group attributes.
+ static function getGroupAttrs($group_id) {
+ global $user;
+ $mdb2 = getConnection();
+
+ $sql = "select * from tt_groups".
+ " where status = 1 and id = $group_id and org_id = $user->org_id";
+ $res = $mdb2->query($sql);
+ if (!is_a($res, 'PEAR_Error')) {
+ $val = $res->fetchRow();
+ }
+ return $val;
+ }
}