diff options
Diffstat (limited to 'lib/RHRD/rddb.pm')
-rwxr-xr-x | lib/RHRD/rddb.pm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/RHRD/rddb.pm b/lib/RHRD/rddb.pm index 14c21a1..f60b78f 100755 --- a/lib/RHRD/rddb.pm +++ b/lib/RHRD/rddb.pm @@ -938,6 +938,33 @@ sub list_shows return @show_dbs; } +sub create_show_group +{ + my ($ctx, $groupname) = @_; + + my ($cnt, $status, $errorstring) = add_group($ctx, $groupname); + unless(defined $cnt) { + return (undef, $status, $errorstring); + } + + (my $low_cart, my $high_cart, $errorstring) = get_shows_next_free_slot($ctx); + if(!$low_cart) { + return (undef, $high_cart, $errorstring); + } + + ($cnt, $status, $errorstring) = set_group_cart_range($ctx, $groupname, $low_cart, $high_cart, 1, 'Y'); + unless(defined $cnt) { + return (undef, $status, $errorstring); + } + + ($cnt, $status, $errorstring) = RHRD::rddb::set_group_reports($ctx, $groupname, 'Y', 'Y', 'Y'); + unless(defined $cnt) { + return (undef, $status, $errorstring); + } + + return ($low_cart, 'OK', 'success'); +} + sub get_show_group_cart_range { my ($ctx, $showid) = @_; |