diff options
author | ivan <ivan> | 2008-03-30 00:57:09 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-03-30 00:57:09 +0000 |
commit | d67dec224bbe9d8d7da71159e3f38477548224d8 (patch) | |
tree | ef47a01b92b501f435f7368149064e50a4518f4c /FS | |
parent | 4a476092eda9c8e42292cc7bf01f5c73cf5abcd0 (diff) |
document config_orbase, add key_orbase for debugging info
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Conf.pm | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 717eb6d..9f607ed 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -150,12 +150,12 @@ sub exists { defined($self->_config($name, $agentnum)); } -#=item config_orbase KEY SUFFIX -# -#Returns the configuration value or values (depending on context) for -#KEY_SUFFIX, if it exists, otherwise for KEY -# -#=cut +=item config_orbase KEY SUFFIX + +Returns the configuration value or values (depending on context) for +KEY_SUFFIX, if it exists, otherwise for KEY + +=cut # outmoded as soon as we shift to agentnum based config values # well, mostly. still useful for e.g. late notices, etc. in that we want @@ -172,6 +172,25 @@ sub config_orbase { } } +=item key_orbase KEY SUFFIX + +If the config value KEY_SUFFIX exists, returns KEY_SUFFIX, otherwise returns +KEY. Useful for which exact configuration option is returned by config_orbase. + +=cut + +sub configkey_orbase { + my $self = shift; + #no compat for this...return $self->_usecompat('config_orbase', @_) if use_confcompat; + + my( $name, $suffix ) = @_; + if ( $self->exists("${name}_$suffix") ) { + "${name}_$suffix"; + } else { + $name; + } +} + =item invoice_templatenames Returns all possible invoice template names. |