diff options
author | terry%netscape.com <> | 1998-09-01 13:21:44 +0200 |
---|---|---|
committer | terry%netscape.com <> | 1998-09-01 13:21:44 +0200 |
commit | 7fa78eee115a50354911bc11bc8047c2e4b7d4ca (patch) | |
tree | 6df662bacb2b57f96b2804289bbaa1a0154dff40 /globals.tcl | |
parent | fa3443b1e248960d9182d03f412fbcb229c9ae3d (diff) | |
download | bugzilla-7fa78eee115a50354911bc11bc8047c2e4b7d4ca.tar.gz bugzilla-7fa78eee115a50354911bc11bc8047c2e4b7d4ca.tar.xz |
Allow editing of parameters via a web page.
Diffstat (limited to 'globals.tcl')
-rw-r--r-- | globals.tcl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/globals.tcl b/globals.tcl index 275a6a301..b8997102c 100644 --- a/globals.tcl +++ b/globals.tcl @@ -437,3 +437,22 @@ proc SqlQuote {str} { return $str } + + +proc Param {value} { + global param + if {[info exists param($value)]} { + return $param($value) + } + # Um, maybe we haven't sourced in the params at all yet. + catch {uplevel \#0 source "params"} + if {[info exists param($value)]} { + return $param($value) + } + # Well, that didn't help. Maybe it's a new param, and the user + # hasn't defined anything for it. Try and load a default value + # for it. + uplevel #0 source "defparams.tcl" + WriteParams + return $param($value) +} |