Roxen.git / server / etc / modules / Variable.pmod / module.pmod

version» Context lines:

Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1: - // $Id: module.pmod,v 1.101 2007/10/17 11:33:45 mathias Exp $ + // $Id: module.pmod,v 1.102 2008/01/29 10:37:05 mathias Exp $      #include <module.h>   #include <roxen.h>      // Locale macros   //<locale-token project="roxen_config"> LOCALE </locale-token>      #define LOCALE(X,Y) \    ([string](mixed)Locale.translate("roxen_config",roxenp()->locale->get(),X,Y))   
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:749:    {    int size = 15;    if( _max != no_limit && _min != no_limit )    size = max( strlen(_format(_max)), strlen(_format(_min)) )+2;    string value;    if (_may_be_empty && (float)query() == (float)0)    value = "";    else    value = query()==""? "" : _format( (float)query() );    +  additional_args = additional_args || ([]); +  additional_args->type="text"; +     return input(path(), value, size, additional_args);    }       void may_be_empty(int(0..1) state)    //! Decides if an empty variable also is valid.    {    _may_be_empty = state;    }   }   
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:846:    add_warning(sprintf(LOCALE(84, "Found the string %O trailing after the integer.\n"), junk));    return what;    }       string render_form( RequestID id, void|mapping additional_args )    {    int size = 10;    if( _min != no_limit && _max != no_limit )    size = max( strlen((string)_max), strlen((string)_min) )+2;    string value = (query() == 0 && _is_empty)? "" : (string)query(); +  +  additional_args = additional_args || ([]); +  additional_args->type="text"; +     return input(path(), value, size, additional_args);    }       void may_be_empty(int(0..1) state)    //! Decides if an empty variable also is valid.    {    _may_be_empty = state;    }   }