Roxen.git/
server/
etc/
modules/
Variable.pmod/
module.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2000-11-27
2000-11-27 10:31:05 by Per Hedbor <ph@opera.com>
5aa5304db6be03486da040163f48934daeb4b079 (
13
lines) (+
9
/-
4
)
[
Show
|
Annotate
]
Branch:
2.1
Fix [Bug
802 (#802)
]
Rev: server/etc/modules/Variable.pmod/module.pmod:1.33
1:
-
// $Id: module.pmod,v 1.
32
2000/11/
20
07
:
04
:
01
per Exp $
+
// $Id: module.pmod,v 1.
33
2000/11/
27
10
:
31
:
05
per Exp $
#include <module.h> #include <roxen.h>
508:
_min = minimum; }
-
array(string|int) verify_set(
int
new_value )
+
array(string|int) verify_set(
mixed
new_value )
{ string warn;
-
+
if(!intp( new_value ) )
+
return ({ sprintf("%O is not an integer",new_value), query() });
+
if( new_value > _max && _max > _min ) { warn = sprintf("Value is bigger than %d, adjusted", _max );
524:
return ({ warn, new_value }); }
-
int transform_from_form(
string
what )
+
int transform_from_form(
mixed
what )
{
-
return
(
int
)what;
+
sscanf( what, "%d", what );
+
return what;
} string render_form( RequestID id, void|mapping additional_args )