Warning: session_start(): open(/var/lib/php/sessions/sess_pemhsh8tu464l35bqjknhmtsv7, 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
static int tbSearch_defaultMax = 3;
static new ThreadLocal tbSearch_quick;
static L tbSearch(S query) {
ret tbSearch(tbSearch_defaultMax, query);
}
static L tbSearch(int max, S query) {
bool quick = isTrue(getAndClearThreadLocal(tbSearch_quick));
S page = loadPage("http://tinybrain.de:8080/tb/search.php?q=" + urlencode(query) + "&limit=" + max + (quick ? "&quick=1" : "") + standardCredentials());
Matcher m = Pattern.compile(">(#\\d+) - (.*?)
").matcher(page);
new L results;
while (m.find())
results.add(new Snippet(
m.group(1),
htmldecode(dropTags(m.group(2))),
null)); // no md5 for now
ret results;
}