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:
parent
3465bba9bb
commit
58bcc84430
12 changed files with 515 additions and 436 deletions
|
@ -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, "<", "<");
|
||||
s = replace(s, ">", ">");
|
||||
if (newlines) s = replace(s, "\n", "<br>\n");
|
||||
return s;
|
||||
}
|
||||
|
||||
|
|
|
@ -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" }),
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue