summaryrefslogtreecommitdiffstats
path: root/class/TableUpstream.php
diff options
context:
space:
mode:
Diffstat (limited to 'class/TableUpstream.php')
-rw-r--r--class/TableUpstream.php22
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