1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

place/threads: use _log to store data, threaded comments

place/archetype.gen: new save log immediately flag to save() after logAppend():
- in place/name.c:
define SAVE_LOG_IMMEDIATELY
- in local.h:
define _flag_save_place_log_immediately
define _flag_save_userthreads_immediately

place/text: added x()
This commit is contained in:
Gabor Adam Toth 2010-02-27 23:58:32 +01:00
parent 3465bba9bb
commit 58bcc84430
12 changed files with 515 additions and 436 deletions

View file

@ -6,12 +6,13 @@
// to make sure they won't trigger
// html commands
//
string htquote(string s) {
varargs string htquote(string s, int newlines) {
ASSERT("htquote", stringp(s), s)
s = replace(s, "&", "&");
// s = replace(s, "\"", """); //"
s = replace(s, "<", "&lt;");
s = replace(s, ">", "&gt;");
if (newlines) s = replace(s, "\n", "<br>\n");
return s;
}

View file

@ -80,7 +80,7 @@ private volatile mapping _sigs = ([
"_request_ent": ({ "_request_entry", 0, "_id" }),
"_request_comment": ({ "_request_comment", 0, "_id", "_text" }),
"_request_com": ({ "_request_comment", 0, "_id", "_text" }),
"_request_thread": ({ "_request_thread", 0, "_id", "_title" }),
"_request_title": ({ "_request_title", 0, "_id", "_title" }),
"_request_addentry": ({ "_request_addentry", 0, "_text" }),
"_request_addent": ({ "_request_addentry", 0, "_text" }),
"_request_submit": ({ "_request_addentry", 0, "_text" }),

View file

@ -172,3 +172,10 @@ varargs void w(string mc, string data, mixed vars) {
}
#endif
// a simple implementation of perl's x operator
string x(string str, int n) {
int i;
string res = "";
for (i = 0; i < n; i++) res += str;
return res;
}