uriel
8f76833a08
Add url_encode function to cgilib.rc
2009-07-20 03:59:49 +00:00
uriel
10477bcbb4
Rewrite redirect handling code with nested lists.
...
New ll_addh to add items to the head of a nested list (use with care!).
2009-03-14 00:28:34 +01:00
uriel
669e9355b9
Cosmetic code fix.
2009-03-03 20:23:51 +00:00
uriel
5a1f4aafb0
Further cleanup and simplification of redirect code.
2009-03-03 13:15:46 +00:00
uriel
bbe63f5f5e
Add note to review and compare html post parsing code with another implementation.
2009-02-18 09:26:19 +00:00
uriel
e66f3666ac
Fix bug in crop_text and make length argument optional (default is 512 chars).
2009-02-13 23:18:34 +00:00
uriel
a1d12138bb
Reorg code in five source files: werc.rc, cgilib.rc, corehandlers.rc, wercconf.rc and werclib.rc.
2009-02-01 20:06:51 +01:00
uriel
e80647ee52
Make http_redirect resolve non-absolute uris. Only allow safe chars for user names. Reliability fixes when checking $status (don't check $#status!). Check user suceeds always if user in admin group.
2009-01-30 16:13:06 +01:00
uriel
b25406c592
Various changes:
...
- New generic http_redirect function, and two shortcuts for 303: post_redirect and 301: perm_redirect
- Allow get_lib_file to take a default value, and change where master_template is set.
- Fix bugs in auth code and properly trim ^M from post data.
- Other cosmetic/minor improvements.
2009-01-25 13:56:53 +01:00
uriel
4302232dd0
Add some comments and replace get_post_args with load_post_args
2009-01-24 07:11:39 +01:00
uriel
5c742826b7
New helpful dprintvars deubg function.
2009-01-23 16:46:25 +01:00
uriel
d349b81ee7
Move comment to where it belong and note deprecation.
2009-01-22 14:24:48 +01:00
uriel
dddc77d560
Rewrite http post parsing code, this should be faster and cleaner, added a
...
get_post_args function to keep backwards compat but it is not really needed.
Fix a silly bug in urldecode.
2009-01-22 14:21:40 +01:00
uriel
6271d7a81a
Fix cookie parsing if more than one cookie present, add optional user/loggin-info sidebar
2009-01-17 03:43:05 +01:00
uriel
679fefacac
Various small cleanups: remove unused code, clarity and reliability fixes here and here, move code to more appropriate locations, improve some comments.
2009-01-12 02:07:31 +01:00
uriel
912dea9e6e
Fix blah to work with new handler interfaces.
...
Remove outdated app-framework code.
Clanup some of the fallback handler setting code.
2009-01-11 04:40:40 +01:00
uriel
116d7c3931
- New static_file and select_mime functions.
...
- Minor improvements to get_post_args, set status unless one of the requested args is present.
2009-01-11 04:02:07 +01:00
uriel
09575c869f
Awk_buffer does seem to improve things a bit, but changed the buffer side to an empirically determined value.
2009-01-09 02:06:41 +01:00
uriel
3e99d92b05
Delete some debug code in a function that is not used yet.
2009-01-09 02:03:36 +01:00
uriel
74f63b6698
Very minor style fixes, and obfuscate local var in ll_add.
2009-01-08 16:48:09 +01:00
uriel
900119d659
Add nested lists rc helper
2009-01-08 16:46:00 +01:00
uriel
63816db0c6
Delete some deprecated code left over from the old blog system.
2009-01-02 16:51:59 +01:00
uriel
1e72e6499f
Two small simplifications to app handling. Specially merge _test and _setup functions into a single _init.
2008-12-28 23:42:24 +01:00
uriel
713a591618
Minor comment cleanups.
2008-12-28 11:51:03 +01:00
uriel
921a67d8df
New function to pick 'metadata' out of new .md convention for attributes.
2008-12-24 12:18:44 +01:00
uriel
270c9999a0
Add sample 'hello world' app and enabled_apps config variable.
2008-12-21 09:37:40 +01:00
uriel
8c10f7653a
Explicitly call awk when running template.awk so we can use p9p's awk if available and improve portability to native Plan 9.
2008-12-21 00:08:49 +01:00
uriel
b99d6ebf78
Add timezone to blog posts date, thanks to dho for the original patch.
...
Used the opportunity to provide the current date/time info in $current_date_time for any other similar uses.
2008-12-20 22:36:25 +01:00
uriel
abb5df1d32
Make coding style more consistent.
2008-12-20 06:32:37 +01:00
uriel
54bb58bef7
First bits of minimal 'modular' app framework, move some blog code out of werc.rc and other minnor code cleanups.
2008-12-20 02:08:12 +01:00
uriel
86c55df5ec
Fix bug in crop_text, and allow to set the 'ellipsis' text ('...' by default)
2008-12-12 02:25:10 +01:00
uriel
41940806db
New helper function: crop_text
2008-11-26 04:50:03 +01:00
uriel
a42e7ad88b
Improvements to auth code, now the interface and implemenation are much cleaner.
2008-10-22 09:18:55 +02:00
uriel
75336c57a5
Replace debug and 'false' calls with setting $status
2008-10-21 16:36:45 +02:00
uriel
3e2903b4e3
Many big changes:
...
* Cache arg list in get_post_args so it can be called more than once and from inside templates.
* Get/set_cookie functions.
* New user auth system that actually works.
* Make_blog_post actually works now.
* Many other fixes and improvments.
2008-10-18 03:26:54 +02:00
uriel
934412c67f
Make rc happy and comment work in progress code
2008-10-14 06:59:19 +02:00
uriel
ba321ad6f1
More minnor comment and code formatting changes
2008-10-14 01:59:10 +02:00
uriel
7a33f7dfb3
Experimental comments system
2008-09-26 14:23:19 +02:00
uriel
5982cea1ba
Syntax fix and other minnor improvements
2008-09-26 11:09:18 +02:00
uriel
e3a70a73fc
Further cleanup and code reorganization, move generic cgi related functions to cgilib.rc, start to add code to be used for handing comments and wiki editing.
2008-09-26 10:35:12 +02:00