summaryrefslogtreecommitdiffstats
path: root/config-db
diff options
context:
space:
mode:
authorOliver Tappe2008-01-11 12:14:32 +0100
committerOliver Tappe2008-01-11 12:14:32 +0100
commita9c3990fa7db53fb3335d7f95dbcf3da62880600 (patch)
tree3db164d8d2bf0c5747133fda869dab1c9483757b /config-db
parent* added new column 'description' to system, which holds an optional (diff)
downloadcore-a9c3990fa7db53fb3335d7f95dbcf3da62880600.tar.gz
core-a9c3990fa7db53fb3335d7f95dbcf3da62880600.tar.xz
core-a9c3990fa7db53fb3335d7f95dbcf3da62880600.zip
* now accepts \n and \t in values and converts them to the respective real
thing (newline or tab) git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1459 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rwxr-xr-xconfig-db/slxconfig17
1 files changed, 14 insertions, 3 deletions
diff --git a/config-db/slxconfig b/config-db/slxconfig
index d59215ed..11e1d602 100755
--- a/config-db/slxconfig
+++ b/config-db/slxconfig
@@ -190,12 +190,18 @@ sub parseKeyValueArgs
}
my $key = lc($1);
my $value = $2;
- if ($value eq '-') {
- $value = undef;
- }
if (!grep { $_ eq $key } @$allowedKeys) {
die _tr("unknown key '%s' specified for %s\n", $key, $table);
}
+
+ if ($value eq '-') {
+ $value = undef;
+ }
+
+ # replace escaped newlines and tab chars by the respective real thing
+ $value =~ s{\\n}{\n}gms;
+ $value =~ s{\\t}{\t}gms;
+
$dataHash{$key} = $value;
}
@@ -221,6 +227,11 @@ sub parseKeyValueArgsWithAttrs
if ($value eq '-') {
$value = undef;
}
+
+ # replace escaped newlines and tab chars by the respective real thing
+ $value =~ s{\\n}{\n}gms;
+ $value =~ s{\\t}{\t}gms;
+
if (grep { $_ eq $key } @$allowedKeys) {
$dataHash{$key} = $value;
} elsif (grep { $_ eq $key } @$allowedAttrKeys) {