1
# See bottom of file for copyright and license details
5
---+ package Foswiki::If::OP_dollar
9
package Foswiki::If::OP_dollar;
10
use base 'Foswiki::Query::UnaryOP';
16
return $class->SUPER::new(
25
my $a = $node->{params}->[0];
27
my $session = $domain{tom}->session;
29
'No context in which to evaluate "' . $a->stringify() . '"' )
31
my $text = $a->_evaluate(@_) || '';
32
if ( $text && defined( $session->{request}->param($text) ) ) {
33
return $session->{request}->param($text);
37
Foswiki::expandAllTags( $session, \$text, $session->{topicName},
38
$session->{webName} );
47
Module of Foswiki - The Free and Open Source Wiki, http://foswiki.org/, http://Foswiki.org/
49
# Copyright (C) 2008 Foswiki Contributors. All Rights Reserved.
50
# Foswiki Contributors are listed in the AUTHORS file in the root
51
# of this distribution. NOTE: Please extend that file, not this notice.
53
# Additional copyrights apply to some or all of the code in this
56
# Copyright (C) 2005-2007 TWiki Contributors. All Rights Reserved.
57
# TWiki Contributors are listed in the AUTHORS file in the root
58
# of this distribution. NOTE: Please extend that file, not this notice.
61
This program is free software; you can redistribute it and/or
62
modify it under the terms of the GNU General Public License
63
as published by the Free Software Foundation; either version 2
64
of the License, or (at your option) any later version. For
65
more details read LICENSE in the root of this distribution.
67
This program is distributed in the hope that it will be useful,
68
but WITHOUT ANY WARRANTY; without even the implied warranty of
69
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
71
As per the GPL, removal of this notice is prohibited.
73
Author: Crawford Currie http://c-dot.co.uk
74
# See bottom of file for copyright and license details
78
---+ package Foswiki::If::OP_dollar
82
package Foswiki::If::OP_dollar;
83
use base 'Foswiki::Query::UnaryOP';
89
return $class->SUPER::new(
97
my $a = $node->{params}->[0];
99
my $session = $domain{tom}->session;
100
throw Error::Simple('No context in which to evaluate "'.
101
$a->stringify().'"') unless $session;
102
my $text = $a->_evaluate(@_) || '';
103
if( $text && defined( $session->{request}->param( $text ))) {
104
return $session->{request}->param( $text );
108
Foswiki::expandAllTags($session, \$text,
109
$session->{topicName},
110
$session->{webName});
119
Module of Foswiki - The Free and Open Source Wiki, http://foswiki.org/, http://Foswiki.org/
121
# Copyright (C) 2008 Foswiki Contributors. All Rights Reserved.
122
# Foswiki Contributors are listed in the AUTHORS file in the root
123
# of this distribution. NOTE: Please extend that file, not this notice.
125
# Additional copyrights apply to some or all of the code in this
128
# Copyright (C) 2005-2007 TWiki Contributors. All Rights Reserved.
129
# TWiki Contributors are listed in the AUTHORS file in the root
130
# of this distribution. NOTE: Please extend that file, not this notice.
133
This program is free software; you can redistribute it and/or
134
modify it under the terms of the GNU General Public License
135
as published by the Free Software Foundation; either version 2
136
of the License, or (at your option) any later version. For
137
more details read LICENSE in the root of this distribution.
139
This program is distributed in the hope that it will be useful,
140
but WITHOUT ANY WARRANTY; without even the implied warranty of
141
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
143
As per the GPL, removal of this notice is prohibited.
145
Author: Crawford Currie http://c-dot.co.uk
146
# See bottom of file for copyright and license details
150
---+ package Foswiki::If::OP_dollar
154
package Foswiki::If::OP_dollar;
155
use base 'Foswiki::Query::UnaryOP';
161
return $class->SUPER::new(
169
my $a = $node->{params}->[0];
171
my $session = $domain{tom}->session;
172
throw Error::Simple('No context in which to evaluate "'.
173
$a->stringify().'"') unless $session;
174
my $text = $a->_evaluate(@_) || '';
175
if( $text && defined( $session->{request}->param( $text ))) {
176
return $session->{request}->param( $text );
180
Foswiki::expandAllTags($session, \$text,
181
$session->{topicName},
182
$session->{webName});
191
Module of Foswiki - The Free and Open Source Wiki, http://foswiki.org/, http://Foswiki.org/
193
# Copyright (C) 2008-2009 Foswiki Contributors. All Rights Reserved.
194
# Foswiki Contributors are listed in the AUTHORS file in the root
195
# of this distribution. NOTE: Please extend that file, not this notice.
197
# Additional copyrights apply to some or all of the code in this
200
# Copyright (C) 2005-2007 TWiki Contributors. All Rights Reserved.
201
# TWiki Contributors are listed in the AUTHORS file in the root
202
# of this distribution. NOTE: Please extend that file, not this notice.
204
This program is free software; you can redistribute it and/or
205
modify it under the terms of the GNU General Public License
206
as published by the Free Software Foundation; either version 2
207
of the License, or (at your option) any later version. For
208
more details read LICENSE in the root of this distribution.
210
This program is distributed in the hope that it will be useful,
211
but WITHOUT ANY WARRANTY; without even the implied warranty of
212
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
214
As per the GPL, removal of this notice is prohibited.
216
Author: Crawford Currie http://c-dot.co.uk