diff options
author | Christian Pointner <equinox@spreadspace.org> | 2015-12-17 16:49:42 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2015-12-17 16:49:42 (GMT) |
commit | 5d28ec02a65b828cc2c9eaac4698980146fef48c (patch) | |
tree | 3c5239f700d5984d2ea61206bebb38a88bf95393 | |
parent | 6dec200e779ad0d2875b6b1b906ea00c0cb84880 (diff) |
add musicpool clock to dropboxes list
-rwxr-xr-x | lib/RHRD/rddb.pm | 11 | ||||
-rwxr-xr-x | test/get-dropboxes | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/RHRD/rddb.pm b/lib/RHRD/rddb.pm index cd0374a..3ffb76a 100755 --- a/lib/RHRD/rddb.pm +++ b/lib/RHRD/rddb.pm @@ -855,16 +855,16 @@ sub get_dropboxes my $sql; if(defined $username && !defined $groupname) { - $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 = ?;}; + $sql = qq{select USER_PERMS.GROUP_NAME,DROPBOXES.TO_CART,DROPBOXES.NORMALIZATION_LEVEL,DROPBOXES.AUTOTRIM_LEVEL,DROPBOXES.SET_USER_DEFINED,DROPBOXES.PATH,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 = ?;}; } elsif(defined $username && defined $groupname) { - $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 = ? and GROUPS.NAME = ?;}; + $sql = qq{select USER_PERMS.GROUP_NAME,DROPBOXES.TO_CART,DROPBOXES.NORMALIZATION_LEVEL,DROPBOXES.AUTOTRIM_LEVEL,DROPBOXES.SET_USER_DEFINED,DROPBOXES.PATH,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 = ? and GROUPS.NAME = ?;}; } elsif(!defined $username && defined $groupname) { - $sql = qq{select GROUPS.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 DROPBOXES, GROUPS where DROPBOXES.GROUP_NAME=GROUPS.NAME and DROPBOXES.STATION_NAME = ? and GROUPS.NAME = ?;}; + $sql = qq{select GROUPS.NAME,DROPBOXES.TO_CART,DROPBOXES.NORMALIZATION_LEVEL,DROPBOXES.AUTOTRIM_LEVEL,DROPBOXES.SET_USER_DEFINED,DROPBOXES.PATH,GROUPS.DEFAULT_LOW_CART,GROUPS.DEFAULT_HIGH_CART,GROUPS.DESCRIPTION from DROPBOXES, GROUPS where DROPBOXES.GROUP_NAME=GROUPS.NAME and DROPBOXES.STATION_NAME = ? and GROUPS.NAME = ?;}; } else { - $sql = qq{select GROUPS.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 DROPBOXES, GROUPS where DROPBOXES.GROUP_NAME=GROUPS.NAME and DROPBOXES.STATION_NAME = ?;}; + $sql = qq{select GROUPS.NAME,DROPBOXES.TO_CART,DROPBOXES.NORMALIZATION_LEVEL,DROPBOXES.AUTOTRIM_LEVEL,DROPBOXES.SET_USER_DEFINED,DROPBOXES.PATH,GROUPS.DEFAULT_LOW_CART,GROUPS.DEFAULT_HIGH_CART,GROUPS.DESCRIPTION from DROPBOXES, GROUPS where DROPBOXES.GROUP_NAME=GROUPS.NAME and DROPBOXES.STATION_NAME = ?;}; } my $sth = $ctx->{'dbh'}->prepare($sql) @@ -888,7 +888,7 @@ sub get_dropboxes } my @allowed_dbs; - while(my ($group, $to_cart, $normlevel, $trimlevel, $params, $lowcart, $highcart, $groupdesc) = $sth->fetchrow_array()) { + while(my ($group, $to_cart, $normlevel, $trimlevel, $params, $path, $lowcart, $highcart, $groupdesc) = $sth->fetchrow_array()) { my @p = split(';', $params); next if (defined $type && $type ne $p[0]); @@ -926,6 +926,7 @@ sub get_dropboxes } elsif(defined($p[0]) && $p[0] eq "M") { $entry->{'TYPE'} = 'musicpool'; $entry->{'MUSICPOOLTITLE'} = $groupdesc; + $entry->{'MUSICPOOLCLOCK'} = $path; } else { $entry->{'TYPE'} = 'unknown'; } diff --git a/test/get-dropboxes b/test/get-dropboxes index 577b8e0..5318153 100755 --- a/test/get-dropboxes +++ b/test/get-dropboxes @@ -71,6 +71,7 @@ for my $href (@dropboxes) { print " jingle-title:" . $href->{'JINGLETITLE'} . "\n"; } elsif($href->{'TYPE'} eq "musicpool") { print " musicpool-title:" . $href->{'MUSICPOOLTITLE'} . "\n"; + print " musicpool-clock:" . $href->{'MUSICPOOLCLOCK'} . "\n"; } print "\n"; } |