summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-09-29 01:17:03 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-09-29 01:17:03 (GMT)
commit15db57fb8eb839f48763394f73709a1d5952131b (patch)
tree81c6cfe7c262d088e8fc69e0158f88fde3a7bd81 /lib
parent59bd1cedd11b6337259578cc15319da5d52e6d22 (diff)
added type filter for list dropboxes
Diffstat (limited to 'lib')
-rwxr-xr-xlib/RHRD/rddb.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/RHRD/rddb.pm b/lib/RHRD/rddb.pm
index 8fc2b3c..09b307b 100755
--- a/lib/RHRD/rddb.pm
+++ b/lib/RHRD/rddb.pm
@@ -643,7 +643,7 @@ sub get_showtitle_and_log
$sth->finish();
unless(defined $title) {
- return (undef, undef, 'ERROR', "Show with ID=" . $showid . " not found!")
+ return (undef, undef, 'ERROR', "Show with ID=" . $showid . " not found!")
}
unless(defined $macros) {
return (undef, undef, 'ERROR', "Show with ID=" . $showid . " has no macro!");
@@ -659,7 +659,7 @@ sub get_showtitle_and_log
sub get_dropboxes
{
- my ($dbh, $username, $groupname) = @_;
+ my ($dbh, $username, $groupname, $type) = @_;
my $sql = qq{select USER_PERMS.GROUP_NAME,DROPBOXES.TO_CART,DROPBOXES.NORMALIZATION_LEVEL,DROPBOXES.AUTOTRIM_LEVEL,DROPBOXES.SET_USER_DEFINED,GROUPS.DEFAULT_LOW_CART,GROUPS.DEFAULT_HIGH_CART,GROUPS.DESCRIPTION from USER_PERMS, DROPBOXES, GROUPS where USER_PERMS.USER_NAME=? and DROPBOXES.GROUP_NAME=USER_PERMS.GROUP_NAME and DROPBOXES.GROUP_NAME=GROUPS.NAME and DROPBOXES.STATION_NAME=?;};
if(defined $groupname) {
@@ -680,6 +680,7 @@ sub get_dropboxes
my @allowed_dbs;
while(my ($group, $to_cart, $normlevel, $trimlevel, $params, $lowcart, $highcart, $groupdesc) = $sth->fetchrow_array()) {
my @p = split(';', $params);
+ next if (defined $type && $type ne $p[0]);
my $entry = {};
$entry->{'GROUP'} = $group;
@@ -760,8 +761,6 @@ sub get_show_carts
return @carts;
}
-return 1;
-
sub get_shows_cart_range
{
my ($dbh) = @_;
@@ -803,3 +802,4 @@ sub get_jingles_next_free_slot
}
################################# END ####################################
+return 1;