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

version» Context lines:

Roxen.git/server/config_interface/sites/add_module.pike:701:    id->variables->config = decode_site_name( 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) { +  return sprintf(LOCALE(0, "Configuration %O not found."), +  id->variables->config); +  } +     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 ) +  if( id->variables->module_to_add && +  id->variables->config )    return do_it( id );       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 );   }