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

version» Context lines:

Roxen.git/server/etc/modules/Variable.pmod/module.pmod:769:    {    return Roxen.html_encode_string( _format(query()) );    }       string render_form( RequestID id, void|mapping additional_args )    {    int size = 15;    if( _max != no_limit && _min != no_limit )    size = max( strlen(_format(_max)), strlen(_format(_min)) )+2;    string value; +  catch {    if (_may_be_empty && (float)query() == (float)0)    value = "";    else    value = query()==""? "" : _format( (float)query() ); -  +  };       additional_args = additional_args || ([]); -  +  if (!additional_args->type)    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:876:    }       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 || ([]); +  if (!additional_args->type)    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:921:    }       array(string) verify_set_from_form( mixed new )    {    return ({ 0, [string]new-"\r" });    }       string render_form( RequestID id, void|mapping additional_args )    {    additional_args = additional_args || ([]); +  if (!additional_args->type)    additional_args->type="text";    return input(path(), (string)query(), width, additional_args);    }   }      // =====================================================================   // Text   // =====================================================================   class Text   //! Text (multi-line string) variable
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:999:    }      }            // =====================================================================   // Password   // =====================================================================   class Password - //! Password variable (uses crypt) + //! Password variable (uses crypt_password)   {    inherit String;    int width = 20;    constant type = "Password";       int(0..1) set_from_form( RequestID id )    {    mapping val;    if( sizeof( val = get_form_vars(id)) &&    val[""] && strlen(val[""]) ) { -  set( crypt( val[""] ) ); +  set( crypt_password( val[""] ) );    return 1;    }    return 0;    }       string render_view( RequestID id )    {    return "******";    }