From 983584fdcdfb282750f6b40beb5e1c43cc498274 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 1 May 2009 02:43:24 +0000 Subject: [PATCH] view all overrides when asked, even the ones without values. hmm :/ RT#5218 --- httemplate/config/config-view.cgi | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/httemplate/config/config-view.cgi b/httemplate/config/config-view.cgi index 534de0231..bb6a3ca0b 100644 --- a/httemplate/config/config-view.cgi +++ b/httemplate/config/config-view.cgi @@ -58,16 +58,7 @@ Click on a configuration value to change it. % #$height = % } % -% my @agents = (); -% if ( $page_agent ) { -% @agents = ( $page_agent ); -% } else { -% @agents = ( -% '', -% grep { defined( _config_agentonly($conf, $i->key, $_->agentnum) ) } -% @all_agents -% ); -% } +% my @agents = $page_agent ? ( $page_agent ) : ( '', @all_agents ); % % foreach my $agent ( @agents ) { % my $agentnum = $agent ? $agent->agentnum : ''; @@ -209,13 +200,15 @@ Click on a configuration value to change it. <%once> #should probably be a Conf method. what else would need to use it? -sub _config_agentonly { - my($self,$name,$agentnum)=@_; - my $hashref = { 'name' => $name }; - $hashref->{agentnum} = $agentnum; - local $FS::Record::conf = undef; # XXX evil hack prevents recursion - FS::Record::qsearchs('conf', $hashref); -} +#not even us, apparantly... +# defined( _config_agentonly($conf, $i->key, $_->agentnum) ) +#sub _config_agentonly { +# my($self,$name,$agentnum)=@_; +# my $hashref = { 'name' => $name }; +# $hashref->{agentnum} = $agentnum; +# local $FS::Record::conf = undef; # XXX evil hack prevents recursion +# FS::Record::qsearchs('conf', $hashref); +#} <%init> -- 2.11.0