From 7fa78eee115a50354911bc11bc8047c2e4b7d4ca Mon Sep 17 00:00:00 2001 From: "terry%netscape.com" <> Date: Tue, 1 Sep 1998 11:21:44 +0000 Subject: Allow editing of parameters via a web page. --- globals.tcl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'globals.tcl') 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) +} -- cgit v1.2.3-24-g4f1b