diff options
author | Remi Collet <fedora@famillecollet.com> | 2010-11-07 12:01:57 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2010-11-07 12:01:57 +0100 |
commit | 32c6495e21342fb589b8d617fbe9ac0d99591232 (patch) | |
tree | eaef5b2d53831873cac1435a343bf1d98cc75c5e /class | |
parent | 20a86c07a82e34b0bb18c41af4c1f63e81e8adcd (diff) |
add TableUpstream->getChannels()
Diffstat (limited to 'class')
-rw-r--r-- | class/TableUpstream.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/class/TableUpstream.php b/class/TableUpstream.php index 6630377..fbf7b98 100644 --- a/class/TableUpstream.php +++ b/class/TableUpstream.php @@ -95,5 +95,27 @@ class TableUpstream extends CommonTable } return $this->add(array_merge($key, $input)); } + + /** + * return the channel list for type of package + * + * @param string $type of package + * + * @return hashtable + */ + public function getChannels($type) { + + $crit = array( + 'DISTINCT' => true, + 'FIELDS' => 'channel', + 'ORDER' => 'channel', + 'type' => $type + ); + $tab = array(); + foreach ($this->request($crit) as $data) { + $tab[] = $data['channel']; + } + return $tab; + } } ?>
\ No newline at end of file |