diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-11-07 12:01:34 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-11-07 12:01:34 +0100 |
commit | 20a86c07a82e34b0bb18c41af4c1f63e81e8adcd (patch) | |
tree | 0e63f02d8994e11365ac6186b6fbe65c52a6fa0d /class/TableAcls.php | |
parent | e90245ea31dacef30ff5ee12c37143c3043a948a (diff) |
add TableAcls->getOwners()
Diffstat (limited to 'class/TableAcls.php')
-rw-r--r-- | class/TableAcls.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/class/TableAcls.php b/class/TableAcls.php index bbf72a1..9ef71ae 100644 --- a/class/TableAcls.php +++ b/class/TableAcls.php @@ -59,5 +59,27 @@ class TableAcls extends CommonTable ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"; $this->exec($sql); } + + /** + * return the owner list for a package, or pattern of package + * + * @param string $name name or SQL pattern + * + * @return array of strings + */ + public function getOwners($name) { + + $crit = array( + 'DISTINCT' => true, + 'FIELDS' => 'owner', + 'ORDER' => 'owner', + 'name' => $name + ); + $tab = array(); + foreach ($this->request($crit) as $data) { + $tab[] = $data['owner']; + } + return $tab; + } } ?>
\ No newline at end of file |