Roxen.git / server / config_interface / sites / add_module.pike

version» Context lines:

Roxen.git/server/config_interface/sites/add_module.pike:655:    } )*"\n"    +"<input type='hidden' name='config' "    "value='"+conf->name+"' />"+cf_form+"</table><p><cf-ok />");   }      mixed do_it( RequestID id )   {    if( id->variables->encoded )    id->variables->config = decode_site_name( id->variables->config );    -  Configuration conf = roxen.find_configuration( id->variables->config ); +  Configuration conf; +  foreach(id->variables->config/"\0", string config) { +  if (conf = roxen.find_configuration( id->variables->config )) { +  id->variables->config = config; +  break; +  } +  }       if( !conf->inited )    conf->enable_all_modules();       array modules = (id->variables->module_to_add/"\0")-({""});    if( !sizeof( modules ) )    return Roxen.http_redirect( site_url(id,conf->name ), id );    return do_it_pass_2( modules, conf, id );   }      mixed parse( RequestID id )   {    if( !config_perm( "Add Module" ) )    return LOCALE(226, "Permission denied");       if( id->variables->module_to_add )    return do_it( id );    -  object conf = roxen.find_configuration( id->variables->config ); +  Configuration conf; +  foreach(id->variables->config/"\0", string config) { +  if (conf = roxen.find_configuration( id->variables->config )) { +  id->variables->config = config; +  break; +  } +  }       if( !config_perm( "Site:"+conf->name ) )    return LOCALE(226,"Permission denied");       if( !conf->inited )    conf->enable_all_modules();       return this_object()["page_"+replace(config_setting( "addmodulemethod" )," ","_")]( id );   }