summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Lorber <keni@his.com>2016-05-12 21:17:58 +0200
committerDylan Hardison <dylan@mozilla.com>2016-05-12 21:18:40 +0200
commit7c1d3b1b83b996df937764aa4ef1cc1dd56f5a46 (patch)
tree80f1df9dde41e422f9509e0315dfaf754cf04031
parent67ad01e07846d7b8e3ce021fa5dccac64c36085d (diff)
downloadbugzilla-7c1d3b1b83b996df937764aa4ef1cc1dd56f5a46.tar.gz
bugzilla-7c1d3b1b83b996df937764aa4ef1cc1dd56f5a46.tar.xz
Bug 1269160 - Localconfig.pm: LOCALCONFIG_VARS docs and functionality loss
r=dylan
-rw-r--r--Bugzilla/Install/Localconfig.pm21
1 files changed, 13 insertions, 8 deletions
diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm
index d5de236e0..82ec9ae35 100644
--- a/Bugzilla/Install/Localconfig.pm
+++ b/Bugzilla/Install/Localconfig.pm
@@ -297,11 +297,15 @@ sub update_localconfig {
open(my $fh, ">:utf8", $filename) or die "$filename: $!";
foreach my $var (LOCALCONFIG_VARS) {
my $name = $var->{name};
- my $desc = install_string("localconfig_$name", { root => ROOT_USER });
- chomp($desc);
- # Make the description into a comment.
- $desc =~ s/^/# /mg;
- print $fh $desc, "\n",
+ my $desc = $var->{desc};
+ if(!length $desc){
+ $desc = install_string("localconfig_$name", { root => ROOT_USER });
+ chomp($desc);
+ # Make the description into a comment.
+ $desc =~ s/^/# /mg;
+ $desc .= "\n";
+ }
+ print $fh $desc,
Data::Dumper->Dump([$localconfig->{$name}],
["*$name"]), "\n";
}
@@ -347,15 +351,16 @@ to access localconfig variables.
=item C<LOCALCONFIG_VARS>
-An array of hashrefs. These hashrefs contain three keys:
+An array of hashrefs. These hashrefs contain two or three keys:
name - The name of the variable.
default - The default value for the variable. Should always be
something that can fit in a scalar.
- desc - Additional text to put in localconfig before the variable
+ desc - If present, additional text to put in localconfig before the variable
definition. Must end in a newline. Each line should start
with "#" unless you have some REALLY good reason not
- to do that.
+ to do that. If not present, the description is taken from
+ F<template/en/default/setup/strings.txt>.
=item C<OLD_LOCALCONFIG_VARS>