add deprecated config options back to Conf.pm to fix "unapplypayments" fails existent...
[freeside.git] / httemplate / config / config-view.cgi
index 9b5b132..9e9e64e 100644 (file)
@@ -78,6 +78,8 @@ Click on a configuration value to change it.
 %   foreach my $agent ( @agents ) {
 %     my $agentnum = $agent ? $agent->agentnum : '';
 %
+%     next if $section eq 'deprecated' && ! $conf->exists($i->key, $agentnum);
+%
 %     my $label = $i->key;
 %     $label = '['. $agent->agent. "] $label"
 %       if $agent && $cgi->param('showagent');
@@ -100,7 +102,8 @@ Click on a configuration value to change it.
 %         my $confnum =
 %           _config_agentonly($conf, $i->key, $agent->agentnum)->confnum;
           (<A HREF="javascript:areyousure('delete this agent override', 'config-delete.cgi?confnum=<% $confnum %>;redirect=config_view_showagent')">delete agent override</A>)
-%       } elsif ( $i->base_key ) {
+%       } elsif ( $i->base_key
+%                 || ( $deleteable{$i->key} && $conf->exists($i->key) ) ) {
 %         my $confnum =
 %           $agent
 %             ? _config_agentonly($conf, $i->key, $agent->agentnum)->confnum
@@ -319,6 +322,9 @@ my $conf = new FS::Conf;
 my @config_items = grep { $page_agent ? $_->per_agent : 1 }
                         $conf->config_items; 
 
+my @deleteable = qw( invoice_latexreturnaddress invoice_htmlreturnaddress );
+my %deleteable = map { $_ => 1 } @deleteable;
+
 my @sections = qw(required billing username password UI session shell BIND );
 push @sections, '', 'deprecated';