summaryrefslogtreecommitdiff
path: root/httemplate/edit/process
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-05-07 16:36:01 -0700
committerIvan Kohler <ivan@freeside.biz>2014-05-07 16:36:01 -0700
commit6cefc6b5606b26af3fecdbf24e8cbebf870577f4 (patch)
treeac83e22e2cafefa2f990f778ec784c3acc8420b1 /httemplate/edit/process
parent204902c9dd654a2bc0e7400b057bcd8c4a60ab54 (diff)
fix agent type selection, RT#28804
Diffstat (limited to 'httemplate/edit/process')
-rwxr-xr-xhttemplate/edit/process/part_pkg.cgi23
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 = (
{