Branch: Tag:

2001-01-29

2001-01-29 05:44:37 by Per Hedbor <ph@opera.com>

Fixed the location the redirect is sent to for list-type widgets.

Rev: server/etc/modules/Variable.pmod/module.pmod:1.45

1: - // $Id: module.pmod,v 1.44 2000/12/30 16:51:15 nilsson Exp $ + // $Id: module.pmod,v 1.45 2001/01/29 05:44:37 per Exp $      #include <module.h>   #include <roxen.h>
969:    m_delete( id->variables, path()+vv );    l = l[..rn-1] + l[rn+1..];    } -  if( do_goto ) -  { -  if( !id->misc->do_not_goto ) -  { -  id->misc->moreheads = ([ -  "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; -  } -  } +        array b;    mixed q = catch( b = verify_set_from_form( l ) );
1001:    set_warning( b[0] );    set( b[1] );    } +  if( do_goto && !id->misc->do_not_goto ) +  { +  RequestID nid = id; +  while( nid->misc->orig ) +  nid = id->misc->orig; +  +  string section = RXML.get_var("section", "var"); +  string query = nid->query; +  if( !query ) +  query = ""; +  else +  query += "&"; +  query += "random="+random(4949494)+(section?"&section="+section:""); +  +  nid->misc->moreheads = +  ([ +  "Location":nid->not_query+(nid->misc->path_info||"")+ +  "?"+query+"#"+path(), +  ]); +  if( nid->misc->defines ) +  nid->misc->defines[ " _error" ] = 302; +  else if( id->misc->defines ) +  id->misc->defines[ " _error" ] = 302;    } -  +  }       string render_form( RequestID id, void|mapping additional_args )    {