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

version» Context lines:

Roxen.git/server/config_interface/sites/add_module.pike:60:    || ((modinfo->type & MODULE_TYPES) && (o=conf->types_module)))    return roxen.find_module( conf->otomod[o] );   }      // To redirect to when done with module addition   string site_url( RequestID id, string site )   {    return "/sites/site.html/"+site+"/";   }    - string page_base( RequestID id, string content ) + string page_base( RequestID id, string content, int|void noform )   {    return sprintf( "<use file='/template' />\n" -  "<tmpl title=' %s'>" +  "<tmpl title=' %s'%s>"    "<topmenu base='/' selected='sites'/>\n"    "<content><cv-split>"    "<subtablist width='100%%'>"    "<st-tabs></st-tabs>"    "<st-page>"    "<if not='1' variable='form.initial'>"    "<gbutton href='add_module.pike?config=&form.config:http;"    "&reload_module_list=yes' > %s </gbutton> "    "<gbutton href='site.html/&form.config;'> %s </gbutton>"    "<p>\n</if>%s\n</p>\n"    "</st-page></subtablist></td></tr></table>"    "</cv-split></content></tmpl>",    LOCALE(258,"Add module"), -  +  noform?" noform='noform'":"",    LOCALE(272,"Reload module list"),    LOCALE(202,"Cancel"), content );   }            string module_name_from_file( string file )   {    string data, name;   
Roxen.git/server/config_interface/sites/add_module.pike:322:    <tr>    <td><font size='+2'>%s</font></td>    <td align='right'>(%s) %s</td>    </tr>    </table>    </td>    </tr>    <tr>    <td valign='top'>    <form method='post' action='add_module.pike'> +  <roxen-automatic-charset-variable/>    <input type='hidden' name='module_to_add' value='%s'>    <input type='hidden' name='config' value='&form.config;'>    <submit-gbutton preparse='1'>%s</submit-gbutton>    </form>    </td>    <td valign='top'>    %s    <p>    %s    </p>
Roxen.git/server/config_interface/sites/add_module.pike:390:   }      string page_normal( RequestID id, int|void noimage )   {    string content = "";    content += "<table>";    string desc, err;    [desc,err] = get_module_list( describe_module_normal(!noimage),    class_visible_normal, id );    content += (desc+"</table>"+err); -  return page_base( id, content ); +  return page_base( id, content, 1 );   }      string page_fast( RequestID id )   {    return page_normal( id, 1 );   }      string describe_module_faster( object module, object block)   {    if(!block)
Roxen.git/server/config_interface/sites/add_module.pike:691:    } )*"\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 );   }