diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-05-07 16:36:01 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-05-07 16:36:01 -0700 |
commit | 6cefc6b5606b26af3fecdbf24e8cbebf870577f4 (patch) | |
tree | ac83e22e2cafefa2f990f778ec784c3acc8420b1 /httemplate/edit/process | |
parent | 204902c9dd654a2bc0e7400b057bcd8c4a60ab54 (diff) |
fix agent type selection, RT#28804
Diffstat (limited to 'httemplate/edit/process')
-rwxr-xr-x | httemplate/edit/process/part_pkg.cgi | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/httemplate/edit/process/part_pkg.cgi b/httemplate/edit/process/part_pkg.cgi index 932e33b1d..9eb10d276 100755 --- a/httemplate/edit/process/part_pkg.cgi +++ b/httemplate/edit/process/part_pkg.cgi @@ -50,8 +50,7 @@ my $precheck_callback = sub { } return "At least one agent type must be specified." unless scalar(@agents) - || ( $cgi->param('clone') && $cgi->param('clone') =~ /^\d+$/ ) - || ( !$cgi->param('pkgpart') && $conf->exists('agent-defaultpkg') ) + #wtf? || ( $cgi->param('clone') && $cgi->param('clone') =~ /^\d+$/ ) || $cgi->param('disabled') || $cgi->param('agentnum'); @@ -232,18 +231,16 @@ foreach my $override_class ($cgi->param) { my $conf = new FS::Conf; -if ( $cgi->param('pkgpart') || ! $conf->exists('agent_defaultpkg') ) { - my @agents = (); - foreach ($cgi->param('agent_type')) { - /^(\d+)$/; - push @agents, $1 if $1; - } - push @process_m2m, { - 'link_table' => 'type_pkgs', - 'target_table' => 'agent_type', - 'params' => \@agents, - }; +my @agents = (); +foreach ($cgi->param('agent_type')) { + /^(\d+)$/; + push @agents, $1 if $1; } +push @process_m2m, { + 'link_table' => 'type_pkgs', + 'target_table' => 'agent_type', + 'params' => \@agents, +}; my @process_o2m = ( { |