diff options
author | Christian Pointner <equinox@spreadspace.org> | 2015-10-07 02:11:40 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2015-10-07 02:11:40 (GMT) |
commit | b040a840eb34d2d5e80fe19ed19a1a8125ca549d (patch) | |
tree | 5a0593fdbc5209f4c376c1a98a5edf000dbaf5d9 /lib | |
parent | a67de4921bd05a567e5957729f1e2d06358d1218 (diff) |
most of add show command is now in rddb
Diffstat (limited to 'lib')
-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) = @_; |