Commit Graph

1183 Commits (3481a35953c0f8e858b382829c239411b06889c4)

Author SHA1 Message Date
Joey Hess 503d83ffbc comments: Fix too loose test for comments pages that matched normal pages with "comment_" in their name. Closes: #521322 2009-03-26 14:04:28 -04:00
Joey Hess a2c0423e54 fix rcs_getctime to return first, not last, change time
This was being buggy and returning the file's last change time, not its
creation time.

(I checked all the others (except tla) and they're ok.)
2009-03-20 16:32:37 -04:00
Joey Hess 2c86616a6a fix rcs_getctime to return first, not last, change time
This was being buggy and returning the file's last change time, not its
creation time.
2009-03-20 16:24:19 -04:00
Joey Hess a1c8520ce8 inline: Fix urls to feed when feedfile is used on an index page.
It would be better to use urlto() here, but will_render
has not yet been called on the feed files at this point, so
it won't work. (And reorganizing so it can be is tricky.)
2009-03-19 16:01:30 -04:00
Joey Hess bb258b56b2 avoid crashing if Sort::Naturally is not installed 2009-03-19 15:35:57 -04:00
chrysn 55b83cb7bd implement sort=title_natural for inline
adds a new sorting order, title_natural, that uses Sort::Naturally's
ncmp function to provide better sorting for inlines
2009-03-19 15:31:46 -04:00
Joey Hess 4ac0b29531 git: Manually decode git output from utf-8, avoids warning messages on invalidly encoded output. 2009-03-09 14:18:55 -04:00
Joey Hess 7bd0d53644 git: Fix utf-8 encoding of author names.
I guess what's happening here is that since the name
is passed to git via an environment variable, perl's normal
utf-8 IO layer stuff doesn't work. So we have to explicitly
decode the string from perl's internal representation into
utf-8.
2009-03-09 14:01:40 -04:00
Joey Hess 793e9332c3 avoid uninitialized value warnings 2009-03-09 13:52:51 -04:00
Joey Hess dd2fa2efb9 When loading a template in scan mode, let preprocess know it only needs to scan.
This makes wikis such as zack's much faster in the scan pass.
In that pass, when a template contains an inline, there is no reason to
process the entire inline and all its pages. I'd forgotten to pass
along the flag to let preprocess() know it was in scan mode, leading to
much unncessary churning.
2009-03-08 18:57:47 -04:00
Joey Hess d3b4c2dbd1 avoid potential infinite loop in smiley expansion
- In 3.05, ikiwiki began expanding templates in scan mode,
  for annoying, expensive, but ultimatly necessary reasons
  of correctness.
- Smiley processing has a bug: It inserts a span for the smiley,
  and then continues searching forward in the content for more,
  starting at $end_of_smiley+1. Which means it searches for smilies
  in the span too! And if it somehow finds one, we get an infinite loop
  here.
- This bug can, probably, only be tickled if a htmllink to
  show the smiley fails, because the smiley file doesn't exist,
  or because ikiwiki doesn't know about it. In that case,
  a link will be inserted to _create_ the missing page,
  and that link will include the smiley inside the <a></a>.
- When a template is expanded in scan mode, and it contains
  an inline, the sanitize hook is run during scan mode,
  which never happened before. That causes the smiley processor
  to run, before ikiwiki is, necessarily, aware that all
  the smiley files exist (depending on scan order). So
  it inserts creation links for them, and triggers the bug.

I've put in the simple fix of jumping forward past the inserted
span, and it does fix the problem. I will need to look in a bit
more detail into why an inline nested inside a template is
fully expanded during the scan pass -- that really shouldn't
be necessary, and it makes things much slower than they need
to be.
2009-03-08 18:49:34 -04:00
Joey Hess 1bf100cfde configure wmd to leave text in markdown 2009-03-08 13:11:26 -04:00
Joey Hess 9a82ef32b9 look for wmd/wmd.js
This means that the underlay needs to have a wmd/wmd/wmd.js,
which is a trifle weird, but it isolates all the wmd stuff in a
single wmd subdirectory of the built wiki. The wmd/images creating
a toplevel images directory was particularly bad.
2009-03-07 19:23:38 -05:00
Joey Hess 72dd9a9a04 make wmd comment support comment editing (I think) 2009-03-07 18:54:26 -05:00
Joey Hess 029cf94493 rebuild not needed
This plugin only affects the page edit, not the compiled wiki.
2009-03-07 14:34:31 -05:00
Joey Hess e7d2da5641 wmd plugin from willu 2009-03-07 14:33:11 -05:00
Joey Hess affd4ca3da goto: Fix typo that broke recentchanges_link compatability. 2009-02-27 13:21:29 -05:00
Joey Hess 596b2906fd bzr: Add missing rcs_diff. (liw) 2009-02-26 14:09:26 -05:00
Joey Hess b30c1b0c38 comments: Avoid showing comment moderation button in prefs to non-admins. 2009-02-26 02:31:13 -05:00
Joey Hess 63439fa10b bzr: Add missing stub rcs_diff. 2009-02-25 16:56:02 -05:00
Joey Hess f813b10fef rename tag() to tagged(); add docs 2009-02-19 18:54:25 -05:00
Joey Hess e611d4cdc1 add tag() pagespec
patch from jon
2009-02-19 18:49:30 -05:00
Joey Hess 5f96944dd5 typo 2009-02-17 19:37:36 -05:00
Joey Hess 52f2235e60 goto: Fix redirect to comments. 2009-02-17 19:36:58 -05:00
Joey Hess 9acc4d578d template: Load templates in scan mode
This is potentially expensive, but is necessary so that meta and tag
directives, and other links on templates affect the page using the template
reliably.
2009-02-17 13:30:07 -05:00
Joey Hess a4497591f9 Revert "comments" (stupid commit)
This reverts commit bb8b8787ef.
2009-02-17 13:29:08 -05:00
Joey Hess bb8b8787ef comments 2009-02-17 13:25:06 -05:00
Joey Hess adcc349d89 check for empty srcdir
This happens when using -dumpsetup
2009-02-14 03:04:11 -05:00
Joey Hess 684cd73a79 downgrade missing shortcuts page error to warning
and response to bug report
2009-02-14 03:01:35 -05:00
Joey Hess 2c51b18aec move check_canedit, check_content to IkiWiki library from editpage
It no longer makes sense to keep these functions in editpage, because
serveral plugins now exist that use them, and users may want to disable
editpage, while leaving those plugins enabled.

Most notably, comments uses both functions, and it's entirely appropriate
to disable editpage but still want to have comments enabled.

Less likely, attachments, rename, and remove all use check_canedit -- but
it would be unusual indeed to want to use these w/o editpage.
2009-02-12 16:33:35 -05:00
Joey Hess 46819b530b shortcut: If default_pageext is set, first look for shortcuts.default_pageext
Falls back to looking for shortcuts.mdwn for backwards compatabiity; there
probably exist wikis that have changed the pageext but still use
shortcuts.mdwn.
2009-02-12 13:04:20 -05:00
Joey Hess 5e2e95a516 doubled semicolons 2009-02-11 12:30:28 -05:00
Simon McVittie dd862b4639 Work around XML::Atom strangeness that results in double-encoded posts
See [[bugs/Aggregated_Atom_feeds_are_double-encoded]]. By default,
XML::Atom outputs strings of UTF-8 bytes with the Perl UTF8 flag stripped
off, which IkiWiki assumes to be Latin-1 and re-encodes as UTF-8 on
output. XML::Feed  does not currently (0.41-1) set the magic variable to
change this behaviour (I've filed a bug on CPAN), but IkiWiki can
usefully set the same variable as a workaround.
2009-02-03 19:48:55 +00:00
Joey Hess 3b83e52018 rename apache404 -> 404
This may already work with other web servers that have copied apache's
interface, and it should be easy to add support to it for web servers that
use some other interface. So, make the name more general.
2009-01-31 19:26:36 -05:00
Joey Hess b0361b8efd factor out IE stupididy workaround 2009-01-31 19:02:50 -05:00
Simon McVittie c886bea320 Split cgi_goto into a goto plugin 2009-01-31 23:01:10 +00:00
Simon McVittie 46b880f839 Split apache404 into an independent plugin
Also make it ignore the 'do' parameter at Joey's suggestion, to have one
less thing to remember when configuring.
2009-01-31 22:32:10 +00:00
Simon McVittie a981d6857f recentchanges: delete CGI hook in favour of the global one 2009-01-31 14:49:25 +00:00
Simon McVittie 4e92548ebc comments: delete cgi hook in favour of the global one 2009-01-31 14:49:12 +00:00
Joey Hess 5dd67723c1 typo 2009-01-26 20:33:55 -05:00
Joey Hess 5c14c7db61 Merge commit 'smcv/underlay' 2009-01-26 20:13:15 -05:00
Joey Hess 848ff1bf5e Merge commit 'smcv/updated' 2009-01-26 20:05:36 -05:00
Joey Hess ce39f8e000 git: Fix malformed utf8 recieved from git.
If git log outputs malformed utf8 in, eg, usernames, detect it and fix it
up. This avoids commits such as f71abc92aa
breaking things.
2009-01-25 23:13:14 -05:00
Joey Hess 42b3e13739 format moderation queue only at end, avoid O(N^3) bug
It was calling format hooks for each comment on the page.
When relativedate is enabled, that made it insert <script> tags
for each comment. And the browser loaded the same script over and over,
which was slow on its own. But that was nothing compared to running
the onload even over and over.. especially since the hook system
added a new call to the hook each time it loaded.

For a page with 10 comments, that caused the relativedate DOM parsing
code to run 1000 times, I think. Anyway, it was sloow. Now it runs once.
2009-01-25 22:30:28 -05:00
Joey Hess 9d4f396b13 add reject all marked defer checkbox 2009-01-25 22:25:45 -05:00
Joey Hess 4e21af7671 sort comment queue by time, newest first 2009-01-25 19:45:56 -05:00
Joey Hess 7a7e28c55f add a button to prefs page for comment moderation 2009-01-25 19:04:45 -05:00
Joey Hess 9a5085e512 clean up comment preview
Remove actions from it, and avoid a broken title link.
2009-01-25 18:56:47 -05:00
Joey Hess 731fc9e7a2 comments: Add a moderation web interface. 2009-01-25 18:49:57 -05:00
Joey Hess c154fa5d6c comments: If comment content checks fail, store the comment (in .ikiwiki/comments_pending) for moderator review. 2009-01-25 15:42:13 -05:00