Roxen.git / server / config_interface / actions / resolv.pike

version» Context lines:

Roxen.git/server/config_interface/actions/resolv.pike:1:   /* -  * $Id: resolv.pike,v 1.42 2011/10/27 17:09:34 jonasw Exp $ +  * $Id$    */   inherit "wizard";   inherit "../logutil";   #include <roxen.h>   #include <request_trace.h>   //<locale-token project="admin_tasks">LOCALE</locale-token>   #define LOCALE(X,Y) _STR_LOCALE("admin_tasks",X,Y)      constant action = "debug_info";   
Roxen.git/server/config_interface/actions/resolv.pike:140:    html_desc += "<br />\n";    resolv +=    "</ol>\n" + html_desc +   #ifdef HAVE_TRACE_TIME    "<i class='timing'>" + format_time (rtimes[level], vtimes[level], timestamp) + "</i>"   #endif    "</div></li>";    level--;   }    + string resolv_describe_backtrace(mixed err) + { +  catch { +  return describe_backtrace(err); +  }; +  catch { +  return sprintf("Thrown value: %O\n", err); +  }; +  return sprintf("Unformatable %t value.\n", err); + } +  + mapping|int resolv_get_file(object c, object nid) + { +  mixed err = catch { +  return c->get_file(nid); +  }; +  +  if (!level) { +  trace_enter_ol("", this_object()); +  } +  trace_leave_ol(sprintf("Uncaught exception thrown:\n\n%s\n", +  resolv_describe_backtrace(err))); +  +  while(level) { +  trace_leave_ol(""); +  } +  return ([]); + } +    void resolv_handle_request(object c, object nid)   {    int again;    mixed file;    function funp;    do    {    again=0;    foreach(c->first_modules(), funp)    {
Roxen.git/server/config_interface/actions/resolv.pike:167:    {    c = nid->conf;    nid->misc->trace_leave("Request transfered to the virtual server "+c->query_name());    again=1;    break;    }    nid->misc->trace_leave("");    }    } while(again);    -  if(!c->get_file(nid)) +  if(!resolv_get_file(c, nid))    {    foreach(c->last_modules(), funp)    {    nid->misc->trace_enter("Last try module", funp);    if(file = funp(nid)) {    if (file == 1) {    nid->misc->trace_enter("Returned recurse", 0);    resolv_handle_request(c, nid);    nid->misc->trace_leave("Recurse done");    nid->misc->trace_leave("Last try done");
Roxen.git/server/config_interface/actions/resolv.pike:213:    "size='12' /></td></tr>\n"    "<tr><td align='left' valign='top'>" + LOCALE(297, "Form variables") + ":</td><td align='left'>"    "<input type='text' size='60' name='form_vars' value='&form.form_vars;' />"    "<br/>Example: <tt>id=234&amp;page=3&amp;hidden=1</tt></td>\n"    "</tr><tr><td align='left' valign='top'>" + LOCALE(325, "HTTP Cookies") + ": </td><td align='left'>"    "<textarea cols='58' row='4' name='cookies'>&form.cookies;</textarea><br />"    "Cookies are separated by a new line for each cookie you want to set. "    "Example:"    "<pre>UniqueUID=eIkT67lksoOe23q\nSessionID=123123:sadfi:114lj</pre></td>"    "</tr></table>\n" -  "<table border='0'><tr><td><cf-ok/></td><td><cf-cancel href='?class=&form.class;'/></td></tr></table>\n"; +  "<table border='0'><tr><td><cf-ok/></td><td><cf-cancel href='?class=&form.class;&amp;&usr.set-wiz-id;'/></td></tr></table>\n";       res +=    #"<script language='javascript'>    function toggle_vis(evt, li_elem) {    var items = [ li_elem ];    if (evt.shiftKey) {    // Include all sibling <li> elements    items = [ ];    var candidates = li_elem.parentNode.children;    for (var i = 0; i < candidates.length; i++)
Roxen.git/server/config_interface/actions/resolv.pike:324:    link_configuration(nid->conf, id->misc->cf_locale) + "<br />\n"    "<ol class='timing'>";       nid->misc->trace_enter = trace_enter_ol;    nid->misc->trace_leave = trace_leave_ol;       if (id->variables->user && id->variables->user!="")    {    nid->rawauth    = "Basic "+MIME.encode_base64(id->variables->user+":"+ -  id->variables->password); +  id->variables->password, 1);    nid->realauth=id->variables->user+":"+id->variables->password;    }       int hrrstart, hrvstart;   #if efun(gethrtime)    hrrstart = gethrtime();   #endif   #if efun(gethrvtime)    hrvstart = gethrvtime();   #endif