Commit Graph

2610 Commits (c4cee4cfc56713ceb5ce684b6a72b4b9ef54ebae)

Author SHA1 Message Date
Joey Hess c4cee4cfc5 add 2 more missing getsetup hooks 2010-07-14 14:44:40 -04:00
Joey Hess fd8bcb32ea add missing getsetup hook 2010-07-13 15:23:44 -04:00
intrigeri 718d9413fb po: added an optional target percentage to needstranslation
(cherry picked from commit 98cc9460ac)
2010-07-12 15:40:39 -04:00
Joey Hess fd2b2f386f Merge branch 'filter-full' 2010-07-12 15:35:40 -04:00
Joey Hess dbb63cb7fd openid: Fix handling of utf-8 nicknames. 2010-07-11 13:38:37 -04:00
Joey Hess b6f7906da6 fix child process error propigation
$? holds the full exit status
2010-07-08 14:14:59 -04:00
Joey Hess d4c11466ba fork a child to run dumpsetup 2010-07-08 13:55:30 -04:00
Joey Hess c23cb312b4 revert bugfix
Not needed; lastupdate will be 0 for new feeds.
2010-07-06 16:02:41 -04:00
Joey Hess 45a5e8e972 bugfix 2010-07-06 15:59:08 -04:00
Joey Hess 2dd0c177a6 aggregate: Write timestamp next aggregation can happen to .ikiwiki/aggregatetime, to allow for more sophisticated cron jobs. 2010-07-06 13:57:17 -04:00
Joey Hess 7e3fb8b8a2 comments: Added commentmoderation directive for easy linking to the comment moderation queue. 2010-07-05 20:19:31 -04:00
Joey Hess f6db10df21 img: Add a margin around images displayed by this directive.
Particularly important for floating images, which could before be placed
uncomfortably close to text.
2010-07-05 14:04:49 -04:00
Joey Hess 7fdf1f1d00 move nickname sanitization out
Probably best to store it unsanitized and sanitize as needed on use.
And it already was for comments, leaving only the need to sanitize the
nickname when git committing, to ensure the email address is legal.
2010-07-04 16:44:38 -04:00
Joey Hess e72ef3b070 comment: Fix problem moderating comments of certian pages with utf-8 in their name. 2010-07-04 16:19:22 -04:00
Joey Hess acde957512 further sanitize nickname characters 2010-07-04 16:12:50 -04:00
intrigeri cd03bd0b80 po: added support for html pagetype
... after having audited the po4a Xml and Xhtml modules for security issues.

Signed-off-by: intrigeri <intrigeri@boum.org>
(cherry picked from commit a128c256a5)
2010-07-04 15:27:02 -04:00
intrigeri a6e629e5cf po: s/utf-8/UTF-8, to solve part of the double commit bug.
(cherry picked from commit 4f44534d72)
2010-07-04 15:25:07 -04:00
Joey Hess 192ce7a238 remove unnecessary and troublesome filter calls
This better defines what the filter hook is passed, to only be the raw,
complete text of a page. Not some snippet, or data read in from an
unrelated template.

Several plugins that filtered text that originates from an (already
filtered) page were modified not to do that. Note that this was not
done very consistently before; other plugins that receive text from a
page called preprocess on it w/o first calling filter.

The template plugin gets text from elsewhere, and was also changed not to
filter it. That leads to one known regression -- the embed plugin cannot
be used to embed stuff in templates now. But that plugin is deprecated
anyway.

Later we may want to increase the coverage of what is filtered. Perhaps
a good goal would be to allow writing a filter plugin that filters
out unwanted words, from any input. We're not there yet; not only
does the template plugin load unfiltered text from its templates now,
but so can the table plugin, and other plugins that use templates (like
inline!). I think we can cross that bridge when we come to it. If I wanted
such a censoring plugin, I'd probably make it use a sanitize hook instead,
for the better coverage.

For now I am concentrating on the needs of the two non-deprecated users
of filter. This should fix bugs/po_vs_templates, and it probably fixes
an obscure bug around txt's use of filter for robots.txt.
2010-07-04 15:06:48 -04:00
Joey Hess 8a8914151c review of needstranslation() pagespec
Minor wording fix; changelog; etc.
2010-07-04 14:22:19 -04:00
intrigeri be49679fe9 po: added a needstranslation() pagespec
(cherry picked from commit b225fdc44d)
2010-07-04 14:20:12 -04:00
Joey Hess 0eabe6f794 git: Added git_wrapper_background_command option. Can be used to eg, make the git wrapper push to github in the background after ikiwiki runs. 2010-07-01 16:57:20 -04:00
Joey Hess bb5193fde1 hnb: Fixed broken use of mkstemp that had caused dangling temp files, and prevented actually rendering hnb files. 2010-06-27 13:49:51 -04:00
Joey Hess d8d057c356 chdir to srcdir in rcs_getctime 2010-06-23 21:29:47 -04:00
Joey Hess 38bf2f6388 bugfix 2010-06-23 20:26:09 -04:00
Joey Hess 9a32451986 finializing openid nickname support
Renamed usershort => nickname.

Note that this means existing user login sessions will not have the nickname
recorded, and so it won't be used for those.
2010-06-23 20:16:01 -04:00
Joey Hess a4f381ace8 git: Record the username from openid in the git author email. (This avoids display of ugly google openids.) 2010-06-23 19:44:41 -04:00
Joey Hess b38b9327a8 take username from email address as fallback 2010-06-23 19:36:23 -04:00
Joey Hess d8e4b51a41 rcs_getctime and rcs_getmtime take relative filenames
There was some confusion about whether the filename was
relative to srcdir or not. Some test cases, and the bzr
plugin assumed it was relative to the srcdir. Most everything else
assumed it was absolute.

Changed it to relative, for consistency with the rest
of the rcs_ functions.
2010-06-23 19:32:53 -04:00
Joey Hess ecdfd1b864 rcs_commit and rcs_commit_staged api changes
Using named parameters for these is overdue. Passing the session in a
parameter instead of passing username and IP separately will later allow
storing other session info, like username or part of the email.

Note that these functions are not part of the exported API,
and the prototype change will catch (most) skew, so I am not changing
API versions. Any third-party plugins that call them will need updated
though.
2010-06-23 19:04:36 -04:00
Joey Hess caf7bcdda3 update for new rcs_commit_staged API
In the process, lost the commits from special usernames
when committing changed po files. Instead of trying to dummy up a session
object for the special username, I just don't pass one, and the commit will
appear to be from whatever user ikiwiki runs as.
2010-06-23 16:56:50 -04:00
Joey Hess 4292802ee5 stop using REMOTE_ADDR
Everywhere that REMOTE_ADDR was used, a session object is available, so
instead use its remote_addr method.

In IkiWiki::Receive, stop setting a dummy REMOTE_ADDR.

Note that it's possible for a session cookie to be obtained using one IP
address, and then used from another IP. In this case, the first IP will now
be used. I think that should be ok.
2010-06-23 16:35:51 -04:00
Joey Hess b4a43406f6 API: rcs_commit and rcs_commit_staged are passed a new parameter
that may contain the username component of the email address of
the user making the commit.
2010-06-23 16:05:49 -04:00
Joey Hess c46bcb425a Add new optional field usershort to rcs_recentchanges.
Now the git plugin supports commits with author fields that look like:
Author: http://my.openid/ <me@web>

Then in recentchanges, the short username will be displayed, linking
to the openid.

Particularly useful for the horrible google openids, of course.
2010-06-23 15:54:52 -04:00
Joey Hess 0580cbbf40 whitespace 2010-06-23 15:23:13 -04:00
Joey Hess 82789e39aa bugfix: record email-like links as page links
This way, an email-like link will be a mailto until a matching page
is created, then it will link to the page. And removing the page will
convert it back to a mailto.
2010-06-23 14:05:57 -04:00
Joey Hess 6e67219eff simplify anchor handling
At least two bugfixes in here. First, an old bug;
\[[foo#0]] was displayed as [[foo]], losing the anchor
as the anchor text was false. Secondly, a new bug;
an email like foo#bar@baz should not check bestlink("foo@baz").
2010-06-23 13:57:27 -04:00
Joey Hess 19dcd50c84 avoid needing full email regexp
Fully validating the email address is not necessary,
all that matters is not matching an url like http://foo@bar/
as an email address.
2010-06-23 13:40:10 -04:00
Bernd Zeimetz dd3274ce73 Enhance the link plugin to handle external links.
The following ways to create a link are supported now:
[[url]]
[[text|url]]
url can be one of the following:
- an internal wikilink: will be handled as before
- any other kind of URL, including mailto: proper links will be created:
  <a href="url">url</a>
  <a href="url">text</a>
- an email address:
  <a href="mailto:url">url</a>
  <a href="mailto:url">text</a>
2010-06-19 03:14:16 +02:00
Joey Hess 57e56828f5 store state to avoid needing to rebuild when changing theme 2010-06-18 16:40:47 -04:00
Joey Hess cfcc79ed4c needsbuild hook is passed an array ref 2010-06-18 16:15:57 -04:00
Joey Hess d5199424c5 avoid shelling 2010-06-18 12:50:31 -04:00
Joey Hess 2797a659db mercurial: Fix buggy getctime code.
The file passed to rcs_getctime is already absolute, and it was
trying to stick the srcdir on the front.

Also, eliminated potentially unsafe shelling.
2010-06-18 12:48:05 -04:00
Joey Hess cb4b999297 avoid dying if cannot chdir to an underlaydir 2010-06-17 16:54:03 -04:00
Joey Hess 184f68efa8 Merge branch 'themes' 2010-06-16 19:17:18 -04:00
Joey Hess eff5e233a2 force list context
run_or_die returns a status code in scalar context
2010-06-16 16:07:41 -04:00
Joey Hess 2f3f826b5b force rebuild for theme change
For now, a rebuild is the only way to ensure the changed theme is used.
Ikiwiki normally will not realize style.css has changed, since themes
tend to have the same timestamp for the file.
2010-06-16 15:44:21 -04:00
Joey Hess 062ed44f47 add theme plugin 2010-06-16 15:43:42 -04:00
Joey Hess a748f283ac Encode not used 2010-06-16 15:30:33 -04:00
Joey Hess 69c22fa1ea attachment: Support Windows paths when taking basename of client-supplied file name. 2010-06-16 13:23:32 -04:00
Joey Hess da2be6e85c git: Gix --gettime to properly support utf8 filenames.
In passing, fixed a bug where the srcdir was in a subdir of a repository
named "0".
2010-06-15 23:21:55 -04:00