From: Nik Okuntseff Date: Fri, 23 Nov 2018 12:26:28 +0000 (+0000) Subject: Wrote ttGroupHelper::getGroupAttrs function. X-Git-Tag: timetracker_1.19-1~569 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8a47b340fd212894ebb7b4456f3f0cb647c9ac68;p=timetracker.git Wrote ttGroupHelper::getGroupAttrs function. --- diff --git a/WEB-INF/lib/ttGroupHelper.class.php b/WEB-INF/lib/ttGroupHelper.class.php index a6d5fea7..21e62a60 100644 --- 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; + } }