Commit Graph

92 Commits (ec965fc92cd41f597c6e8e88584b9a688407c8c6)

Author SHA1 Message Date
Joey Hess 15ec55eff5 elide unnecessary variables 2008-12-12 15:38:23 -05:00
Joey Hess ef972a871b remove fixme
sessioncgi hooks are always called with the wiki locked
2008-12-12 15:25:12 -05:00
Joey Hess 928f6938d2 fix redefinition of $author 2008-12-12 15:22:43 -05:00
Joey Hess 9557c7c890 move related code together 2008-12-12 15:19:01 -05:00
Joey Hess f3735891ca whitespace 2008-12-12 15:13:07 -05:00
Joey Hess 18eeb068a6 don't explicitly use inline
loadplugin("inline") should take care of that
2008-12-12 15:10:17 -05:00
Joey Hess 2a7849b838 avoid unnecessary variable 2008-12-12 15:08:06 -05:00
Joey Hess 0ced5995d5 get rid of the [postcomment] hack
I think that using a flag variable is sorta cleaner.

(This is untested.)
2008-12-12 15:05:26 -05:00
Joey Hess 38c92e63bb move getsetup to usual place 2008-12-12 14:59:23 -05:00
Simon McVittie 1942fc3bd6 comments: Store dates in GMT and in ISO-8601
The [[!_comment]] directive is a serialization format, not something for
presentation to users, so we should use the least ambiguous possible
representation.
2008-12-12 11:02:41 +00:00
Simon McVittie f2d5ead6af comments: Change internal-use-only directive from [[!comment]] to [[!_comment]] 2008-12-11 21:23:55 +00:00
Simon McVittie dd1fa13bce comments: Use new feedfile, emptyfeeds options to inline 2008-12-11 21:19:50 +00:00
Simon McVittie 3560460eb6 comments: don't interpolate IP into anonymous user's "name"
If an admin wants the IP in the comment display template they can still
get it (the default template shows it).
2008-12-11 21:14:05 +00:00
Simon McVittie 1698364da0 comments: fix invocation of possibly_foolish_untaint 2008-12-11 21:14:05 +00:00
Simon McVittie fbf145ca3f comments: avoid warning if there's no subject 2008-12-11 21:14:05 +00:00
Simon McVittie a5889912b3 comments: Optionally allow anonymous commenters to set their name/URL.
Also provide a way for the comment template to pick up the verified
username/IP.
2008-12-11 21:14:05 +00:00
Simon McVittie 0a69c7ed56 comments: Remove some dead code 2008-12-11 21:14:05 +00:00
Simon McVittie 44a7d77a30 comments: rename main field to "editcontent" consistent with editpage
This has the side-effect that Ikiwiki's default style.css gives the text
box 100% width.
2008-12-11 21:14:05 +00:00
Simon McVittie edb69335f2 comments: instead of hard-coding mdwn, allow any supported page format 2008-12-11 21:14:05 +00:00
Simon McVittie 9af0f04df3 comments: Save comments as a file with one big [[!comment]] directive.
This delays all comment formatting until the last possible time, allows
us to set metadata without worrying that commenters may be able to evade
it, and means that changes to how a comment is saved can be handled
gracefully. It also gives us somewhere to put the commenter's username
or IP address for later reference.
2008-12-11 21:14:05 +00:00
Simon McVittie 6a986a8a0b Remove dead code for preprocessing [[!comments]] 2008-12-11 21:14:05 +00:00
Simon McVittie 1d696aef2c comments: Duplicate logic and CGI hook from recentchanges to link user pages correctly 2008-12-11 21:14:05 +00:00
Simon McVittie f88870f102 Qualify name of formattime() correctly 2008-12-11 21:14:04 +00:00
Simon McVittie 80e84e32bf Delay checking for session expiry til we actually post a comment 2008-12-11 21:14:04 +00:00
Simon McVittie 24bfc3fdc5 comments: record the time at which each comment was posted 2008-12-11 21:14:04 +00:00
Simon McVittie e66e2c2a7e comments: Use a checkconfig hook to get the default value of comments_pagename 2008-12-11 21:14:04 +00:00
Simon McVittie 4ff161ba0b comments: render comments/commenturl in page.tmpl 2008-12-11 21:14:04 +00:00
Simon McVittie 49eabc676a comments: use global config to decide whether commenting is allowed, and for name of page
Also:
* decide comment page name sooner
* set permalink on it
2008-12-11 21:14:04 +00:00
Simon McVittie a9b0b3da5f comments: use global configuration for allow_directives, commit, and pagename 2008-12-11 21:14:04 +00:00
Simon McVittie d35a2bd2de comments: Add some global configuration 2008-12-11 21:14:04 +00:00
Simon McVittie 4972baac4d comments: make preprocess a no-op 2008-12-11 21:14:04 +00:00
Simon McVittie c9bb8b03a4 comments: document what linkuser does 2008-12-11 21:14:03 +00:00
Simon McVittie 404792c618 comments: add a stub pagetemplate hook to show the comments 2008-12-11 21:14:03 +00:00
Simon McVittie 3abfc1d71c comments: Use HTML entities to escape directives 2008-12-11 21:14:03 +00:00
Simon McVittie 430ac61f21 Embed comments into comments_embed.tmpl rather than concatenating in perl 2008-12-11 21:14:03 +00:00
Simon McVittie 286dbb0541 comments: use CGI module's checksessionexpiry 2008-12-11 21:14:03 +00:00
Simon McVittie 249ea2ed75 comments: remove allowhtml option, just switch it on all the time
Now that posts are individually sanitized, that should be safe.
2008-12-11 21:14:03 +00:00
Simon McVittie 4663f364bb comments: load inline and mdwn lazily 2008-12-11 21:14:03 +00:00
Simon McVittie 9d92fd5eb0 comments: don't rely on mdwn getting loaded first 2008-12-11 21:14:03 +00:00
Simon McVittie ebe140201e comments: sanitize the body of each comment before posting it
This should ensure that users can't "break out" from the enclosing
<div>, making it impossible to forge comments (assuming htmlscrubber
is enabled, and so is either htmlbalance or htmltidy).
2008-12-11 21:14:03 +00:00
Simon McVittie 57e40b9ce5 Fix typo that led to comments being blanked 2008-12-11 21:14:02 +00:00
Simon McVittie 3d4aa065d6 postcomment: Rename plugin to comments, use *._comment files
The PageSpec is still called "postcomment" since that's what it means.
2008-12-11 21:14:02 +00:00