Warning: session_start(): open(/var/lib/php/sessions/sess_hfo716va1h84i4fefpbgvoc112, 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
!759
static PersistentMap urlToText;
p {
urlToText = new PersistentMap("urlToText");
}
static synchronized S html(S uri) {
uri = dropPrefix("/", uri);
if (empty(uri) || eq(uri, "list")) {
new L list;
for (S url : keys(urlToText)) {
list.add(a("/" + url, "href", pageLink(url)));
}
ret h3("Pages") + ul(list);
}
S html = urlToText.get(tlc(uri));
ret or2(html, "?");
}
static sync boolean hasURL(S bla) {
ret urlToText.containsKey(tlc(bla));
}
static sync S getTextForURL(S bla) {
ret urlToText.get(tlc(bla));
}
// returns previous text if any
static sync S setURL(S bla, S text) {
ret urlToText.put(tlc(bla), text);
}