summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2010-11-07 12:01:34 +0100
committerRemi Collet <fedora@famillecollet.com>2010-11-07 12:01:34 +0100
commit20a86c07a82e34b0bb18c41af4c1f63e81e8adcd (patch)
tree0e63f02d8994e11365ac6186b6fbe65c52a6fa0d
parente90245ea31dacef30ff5ee12c37143c3043a948a (diff)
add TableAcls->getOwners()
-rw-r--r--class/TableAcls.php22
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