1 # Copyright 2002-2007 Interchange Development Group and others
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version. See the LICENSE file for details.
8 # $Id: var.tag,v 1.12 2007-03-30 23:40:57 pajamian Exp $
10 UserTag var Order name global filter
11 UserTag var Interpolate 1
12 UserTag var Version $Revision: 1.12 $
13 UserTag var Routine <<EOR
15 my ($key, $global, $filter) = @_;
17 if ($global and $global != 2) {
18 $value = $Global::Variable->{$key};
20 elsif ($Vend::Session->{logged_in} and defined $Vend::Cfg->{Member}{$key}) {
21 $value = $Vend::Cfg->{Member}{$key};
25 $::Pragma->{dynamic_variables}
26 ? Vend::Interpolate::dynamic_var($key)
29 $value ||= $Global::Variable->{$key} if $global;
31 $value = filter_value($filter, $value, $key) if $filter;