Warning: session_start(): open(/var/lib/php/sessions/sess_0ge3t124foh5257o4peabpbbc6, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
// TODO: share transpiler
html {
if (!webAuthed(params)) ret "not authed";
if (eq("1", params.get('fresh)))
refreshTranspiler();
uri = dropPrefixSlash(uri);
if (isSnippetID(uri)) params.put(snippetID := uri);
if (empty(params.get('snippetID))) ret "OK";
final bool compile = eq("1", params.get('compile));
final new Flag ok;
S text = hijackPrint_tee(r {
S snippetID = fsI(params.get('snippetID));
pcall {
temp tempSetTL(transpileForServer_compile, compile);
transpileForServer(snippetID);
ok.raise();
}
});
S redirect = params.get('redirect);
ret hhtml(hhead(htitle((ok.isUp() ? "OK" : "Failed") + " Transpilation")
+ (ok.isUp() && nempty(redirect) ? hrefresh(2, redirect) : ""))
+ hbody(hsourcecode(text)));
}