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.29 2000/11/02 11:41:03 per Exp $ + // $Id: module.pmod,v 1.30 2000/11/10 23:11:59 per 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:877:    }   }         // =====================================================================   // List baseclass   // =====================================================================   class List   //! Many of one type types   { -  inherit String; +  inherit Variable;    constant type="List";    constant width = 40;       string transform_to_form( mixed what )    //! Override this function to do the value->form mapping for    //! individual elements in the array.    {    return (string)what;    }   
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:957:    "Location":Roxen.http_encode_string(id->raw_url+"?random="+    random(4949494)+    "&section="+    id->variables->section+    "#"+path()),    ]);    if( id->misc->defines )    id->misc->defines[ " _error" ] = 302;    }    } -  set( l ); // We are done. :-) +  +  array b; +  mixed q = catch( b = verify_set_from_form( l ) ); +  if( q || sizeof( b ) != 2 ) +  { +  if( q ) +  set_warning( q ); +  else +  set_warning( "Internal error: Illegal sized array " +  "from verify_set_from_form\n" ); +  return;    } -  +  if( b ) +  { +  set_warning( b[0] ); +  set( b[1] ); +  } +  }       string render_form( RequestID id, void|mapping additional_args )    {    string prefix = path()+".";    int i;       string res = "<a name='"+path()+"'>\n</a><table>\n"    "<input type='hidden' name='"+prefix+"count' value='"+_current_count+"' />\n";       foreach( map(query(), transform_to_form), string val )