Commit Graph

2679 Commits (095b9f1ef5b630a8556247f75ec4e7fbcc7fbb4b)

Author SHA1 Message Date
Joey Hess d3d3bbbb17 saner return codes for check_can{remove,rename}
These return codes are not currently used, but might be later.
2010-08-30 18:48:38 -04:00
Joey Hess f55c7d1396 httpauth: Avoid redirecting the user to the cgiauthurl if they already have a login session. 2010-08-30 18:33:00 -04:00
Joey Hess 2df0999e40 revert check_canedit nosubs thing
Abstraction violation. I now think the problem should be treated as a bug
in httpauth.
2010-08-30 18:31:56 -04:00
Joey Hess 70db57134a correct logic on error fallthrough 2010-08-30 18:20:34 -04:00
Joey Hess 8030ecac02 Receive: avoid hiding check_canedit error messages
Avoid the generic "you are not allowed to change" message,
and instead allow check_canedit to propigate out useful error messages.

Went back to calling check_canedit in fatal mode, but added a parameter to
avoid calling the troublesome subs that might cause a login attempt.
2010-08-30 17:58:00 -04:00
Joey Hess 8135d2a9eb remove dead code 2010-08-30 17:38:00 -04:00
Joey Hess 426b3ad747 minor typo 2010-08-30 16:26:01 -04:00
Joey Hess 3b84ea2f53 add explicit check_canedit calls when checking canattach or canremove 2010-08-30 16:17:33 -04:00
Joey Hess a330b1ee74 Avoid trying to log the user in when receiving anonymous pushes from git and a plugin like httpauth returns a login function.
Just use check_canedit in nonfatal mode.
2010-08-30 16:05:15 -04:00
Joey Hess 75382bd374 factor out check_canedit calls from check_canremove 2010-08-30 15:58:42 -04:00
Joey Hess 7784e0b7b8 don't run check_canedit in nonfatal mode 2010-08-30 15:57:10 -04:00
Joey Hess 69fc0f427e remove obsolete check to see if check_canedit is available
The function moved from the editpage plugin into IkiWiki core some time
ago.
2010-08-30 15:44:55 -04:00
Joey Hess 4e14c5e793 call preprocess in scan mode hooks before scan hooks
Following along with change in Render.pm
2010-08-30 15:06:58 -04:00
Joey Hess 931036eb5c Merge remote branch 'intrigeri/po' 2010-08-30 14:47:57 -04:00
Joey Hess 7ab84dcfe5 highlight: Make location of highlight's files configurable in setup file to allow for nonstandard installations. 2010-08-30 13:15:49 -04:00
intrigeri e85c15e75b Merge remote branch 'upstream/master' into prv/po 2010-08-22 11:09:37 +02:00
intrigeri 474b6524e0 Merge remote branch 'upstream/master' into prv/po 2010-08-22 11:05:03 +02:00
Joey Hess 9b9ecda62f htmlscrubber: Do not scrub url anchors that contain colons. 2010-08-19 13:59:31 -04:00
Giuseppe Bilotta df5de5b967 smiley: warn instead of error for missing smileys
A missing smileys.mdwn caused the plugin to error out interrupting the
building process. Instead, we check for the file presence and warn without
erroring out in case it's missing, in a similar fashion as it's
currently done for the shortcut plugin.
2010-08-13 17:58:21 -04:00
Joey Hess efd8e93c5b Revert "insert flattr javascript via sanitize, not format hook"
This reverts commit 3ef8864122.

Most aggregators block javascript and so it would display uglily.
Need to find a way to fallback to static buttons instead.
2010-08-12 18:18:35 -04:00
Joey Hess 3ef8864122 insert flattr javascript via sanitize, not format hook
This makes the javascript be added to rss feeds, which allows the buttons
to be displayed by aggregators. At least, if the aggregator does not
sanitize javascript.
2010-08-12 17:19:20 -04:00
Joey Hess 80102c042d flattr: New plugin.
Thanks to jaywalk for the initial implementation at a flattr plugin!

This one is less configurable, but simpler.
2010-08-12 16:53:55 -04:00
Joey Hess a68241838b correct comment; javascript is put after <body> 2010-08-12 14:29:22 -04:00
Joey Hess 51d5e54697 filecheck: Fall back to using the file command if the freedesktop magic file cannot identify a file. 2010-08-09 13:18:59 -04:00
intrigeri 0055354e3c fix copy'n'paste error 2010-08-02 15:27:52 +02:00
intrigeri 5b0890f402 po: re-scan in scan hook rather than using the rescan hook that won't be added. 2010-08-02 13:39:41 +02:00
intrigeri a3624aba40 Run the preprocess hooks in scan mode *before* the scan hooks. 2010-08-02 13:39:06 +02:00
intrigeri 46a997db16 Revert "Added a rescan hook."
This reverts commit 25447bccae.
2010-08-02 13:14:33 +02:00
intrigeri 352c62a8de po: ignore non-existent translations in otherlanguages* 2010-08-02 13:10:28 +02:00
intrigeri d8a99e97ad po: avoid bringing duplicates into %links 2010-08-02 12:52:46 +02:00
intrigeri d9f0b56a41 po(mybestlink): avoid linking to non-existent translation pages. 2010-08-02 12:52:10 +02:00
intrigeri 22d9822437 Merge remote branch 'upstream/master' into prv/po 2010-08-02 11:18:35 +02:00
Joey Hess fee00fdb7a Use Digest::SHA built into perl rather than external Digest::SHA1 to simplify dependencies. Closes: #591040 2010-07-31 15:54:25 -04:00
intrigeri 5948bb01cb po: rescan converted content on refresh too. 2010-07-30 16:20:12 +02:00
intrigeri b09b8621b2 po: use rescan hook instead of rebuilding twice.
The po rescan hook re-runs the scan hooks, and runs the preprocess ones in scan
mode, both on the po-to-markup converted content. This way, plugins such as meta
are given a chance to gather correct information, rather than ugly/buggy escaped
data it did gather from unconverted PO files.
2010-07-30 16:14:30 +02:00
intrigeri 25447bccae Added a rescan hook.
This is needed for the po plugin vs. e.g. meta titles.

In order to get rid of the ugly "rebuilding all pages to fix meta titles" thing,
Joey suggested to make "po, at scan time, re-run the scan hooks, passing them
modified content (either converted from po to mdwn or with the escaped stuff
cheaply de-escaped)". This would unfortunately not work, as the meta plugin
gathers its data using the preprocess hook in scan mode: it would overwrite with
buggy data the correct data we would have forced it to gather in po's scan hook.

We then need a hook that runs *after* the preprocess hook has been run in scan
mode, but *before* any page rendering is started. Hence this one.
2010-07-30 16:14:23 +02:00
Joey Hess d1a5d00156 remove debug code 2010-07-26 17:53:06 -04:00
Joey Hess c401b6958a Add new disable hook, allowing plugins to perform cleanup after they have been disabled. 2010-07-26 16:33:42 -04:00
Joey Hess b300bc9650 use new disable hook
clean up xapian db when plugin is disabled
2010-07-26 16:23:10 -04:00
Joey Hess aa78c142b8 avoid generating receive wrapper if there are no untrusted committers
The wrapper is pointless in that configuration. Also, the code for it
doesn't compile w/o untrusted commiters to test. :)
2010-07-26 13:30:45 -04:00
Joey Hess dd9d117894 meta: Allow syntax closer to html meta to be used.
The idea here is that <meta name="foo" description="bar">
can be written like [[!meta name="foo" description="bar">.
Of course, [[!meta foo=bar]] is still supported; this new feature
provides some DWIM when trying to directly convert a meta tag into
a meta directive.
2010-07-25 20:18:02 -04:00
Joey Hess 0aa621a833 move wrapper building loop into Wrapper.pm 2010-07-24 17:33:59 -04:00
Joey Hess a7454c0e32 git: Fix gitweb historyurl examples so "diff to current" links work. (Thanks jrayhawk) 2010-07-24 06:18:19 -04:00
intrigeri 2f71e7f8f5 Merge remote branch 'upstream/master' into prv/po 2010-07-24 11:19:28 +02:00
Joey Hess b5bd92e77e whitespace fixes and a typo 2010-07-23 14:26:57 -04:00
intrigeri bb22e8c4a6 po: optimization
No need to use "keys %{$config{po_slave_languages}}" repeatedly:
the slave languages codes list is already cached in @slavelanguages.
2010-07-20 02:26:23 +02:00
intrigeri 862fc7c1ab Support ordered po_slave_languages as discussed previously.
Backward compatibility is still supported.
2010-07-20 02:25:17 +02:00
Joey Hess 35c9956df0 Revert "po_slave_languages can now be a hash, if order matters."
This reverts commit 4cf185e781.

That commit broke t/po.t (probably the test case only is testing too
close the the old implementation and needs correcting).

Also, we have not decided how to want to represent it yet, so I'm not
ready for this change.

Conflicts:

	IkiWiki/Plugin/po.pm
	doc/plugins/po.mdwn
2010-07-18 20:04:39 -04:00
Joey Hess bfd896f5e5 typo 2010-07-18 19:37:14 -04:00
Joey Hess b45688e34e Merge remote branch 'intrigeri/po' 2010-07-18 19:35:16 -04:00