summaryrefslogtreecommitdiffstats
path: root/globals.tcl
diff options
context:
space:
mode:
authorterry%netscape.com <>1998-09-01 13:21:44 +0200
committerterry%netscape.com <>1998-09-01 13:21:44 +0200
commit7fa78eee115a50354911bc11bc8047c2e4b7d4ca (patch)
tree6df662bacb2b57f96b2804289bbaa1a0154dff40 /globals.tcl
parentfa3443b1e248960d9182d03f412fbcb229c9ae3d (diff)
downloadbugzilla-7fa78eee115a50354911bc11bc8047c2e4b7d4ca.tar.gz
bugzilla-7fa78eee115a50354911bc11bc8047c2e4b7d4ca.tar.xz
Allow editing of parameters via a web page.
Diffstat (limited to 'globals.tcl')
-rw-r--r--globals.tcl19
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)
+}