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.24 2000/09/28 03:40:33 per Exp $ + // $Id: module.pmod,v 1.25 2000/09/28 03:43:35 per Exp $      #include <module.h>   #include <roxen.h>      // Locale macros   static inline string getloclang() {    return roxenp()->locale->get();   }      //<locale-token project="roxen_config"> LOCALE </locale-token>
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:202:    {    if( to && strlen(to) )    all_warnings[ _id ] = to;    else    m_delete( all_warnings, _id );    }       void add_warning( string to )    //! Like set_warning, but adds to the current warning, if any.    { -  if(!to) -  set_warning( 0 ); -  else -  set_warning( (get_warnings()||"") + to ); +  if(to) set_warning( (get_warnings()||"") + to );    }       int set( mixed to )    //! Set the variable to a new value.    //! If this function returns true, the set was successful.    //! Otherwise 0 is returned. 0 is also returned if the variable was    //! not changed by the set. 1 is returned if the variable was    //! changed, and -1 is returned if the variable was changed back to    //! it's default value.    //!
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:339:    mixed q = catch( b = verify_set_from_form( val ) );    if( q || sizeof( b ) != 2 )    {    if( q )    add_warning( q );    else    add_warning( "Internal error: Illegal sized array "    "from verify_set_from_form\n" );    return;    } -  if( b ) { -  if ( b[0] ) set_warning( b[0] ); +  if( b ) +  { +  set_warning( b[0] );    set( b[1] );    }    }    }       string path()    //! A unique identifier for this variable.    //! Should be used to prefix form variable names.    //!    //! Unless this variable was created by defvar(), the path is set