Commit Graph

2165 Commits (beae7ef9db01ab2af75d3176b016113c9d33f0a9)

Author SHA1 Message Date
Joey Hess e7d6dcfed6 remove todo item
I understand the need to avoid chdir when running git_parse_changes
for receive now. At that point, the changes have not been pushed to
the srcdir's repo yet. When running the same code for preprevert,
chdir to the srcdir is ok, and necessary.
2010-10-08 18:46:30 -04:00
Joey Hess faf94b5787 refactor check_canchange into IkiWiki library 2010-10-08 18:09:28 -04:00
Joey Hess 5c6f7a8d1b fix rcs_prepedit implementation to match spec 2010-10-08 18:02:47 -04:00
Joey Hess 84111d96c4 make revert hooks optional
I removed the IkiWiki::rcs_ stubs for the revert hooks. Instead
recentchanges tests to see if the hooks are available and calls
them directly.
2010-10-08 17:54:12 -04:00
Joey Hess 238e8b95a5 convert rcs_revert to only stage the reversion 2010-10-06 15:08:12 -04:00
Joey Hess 58a0698d92 return to recentchanges page on form cancel 2010-10-06 15:02:06 -04:00
Joey Hess d4fd8cd67d put diff at end of revert form 2010-10-06 15:00:48 -04:00
Joey Hess 237ea79d71 remove rcs_showpatch 2010-10-06 14:39:10 -04:00
Joey Hess 3dce3cc1be indentation and layout 2010-10-04 16:56:04 -04:00
Joey Hess 80da2b2840 fix $git_root caching 2010-10-04 16:35:17 -04:00
Joey Hess f025923d14 fix indentation 2010-10-04 16:33:36 -04:00
Joey Hess 3f3aab3793 document new rcs reversion support functions 2010-10-04 16:22:50 -04:00
Joey Hess 68670cad82 indentation 2010-10-04 16:03:00 -04:00
Joey Hess 49ef98505a fix bug if git_root is "0" 2010-10-04 16:01:21 -04:00
Joey Hess 252e3f6006 Merge remote branch 'remotes/peteg/revert' into revert 2010-10-04 15:59:45 -04:00
Joey Hess bd48ff734a fixups tidy change
Need checkconfig hook; examples don't become default values.
2010-10-02 12:02:34 -04:00
Peter Gammie 7d1c3aa1cb Minor tidy-ups. 2010-10-01 14:08:07 +10:00
Peter Gammie 8024a2636f Complete rcs_preprevert and lightly test. 2010-10-01 14:06:00 +10:00
W. Trevor King 408ee89fd7 Make tidy command line configurable for the htmltidy plugin. 2010-09-30 08:09:29 -04:00
Peter Gammie 941755e466 Get things right after moving to a branch. 2010-09-29 15:43:44 +10:00
Peter Gammie acecbad0ff First cut at the revert plugin. 2010-09-29 15:14:19 +10:00
Joey Hess e22b18aabc template_depends: throw nice error message when template cannot be found
plovs reported a crash when templates were not installed properly,
with a non-useful error about the template object not being defined.
I've audited all uses of template_depends(), and template(), and it makes
sense for them to throw an error if the template cannot be found. All code
with a user-supplied template catches errors already, to handle template
parse failures.

It did not make sense for template_file to throw errors, as some code uses
it to probe if a template file is available.
2010-09-27 15:58:01 -04:00
Joey Hess 00595b62be avoid fatal error if aggregate page template could not be found
That template is user-controlled.
2010-09-27 15:44:04 -04:00
Simon McVittie 5876968fa1 htmlbalance: be compatible with HTML::Tree 4.0
The HTML::Tree changelog says:

    [THINGS THAT MAY BREAK YOUR CODE OR TESTS]
    ...
    * Attribute names are now validated in as_XML and invalid names will
      cause an error.

and indeed the regression tests do get an error.
2010-09-26 22:33:54 +01:00
Joey Hess 90bc68589e attachment: Fix attachment file size display. 2010-09-21 15:33:42 -04:00
Joey Hess 8063b960ad meta: Ensure that the url specified by xrds-location is absolute.
With a relative xrds-location, the openid perl client module will fail.
I haven't checked the specs to see if it needs to be absolute, but all
examples I've seen are absolute, so it seems a very good idea.
2010-09-19 20:15:34 -04:00
Joey Hess 2ca4ff8ae6 add missing space 2010-09-19 20:04:31 -04:00
Joey Hess 884835ce1c cutpaste: Fix bug that occured in some cases involving inlines when text was pasted on a page before being cut. 2010-09-15 16:24:50 -04:00
Joey Hess cd794613b6 git: When updating from remote, use git pull --prune, to avoid possible errors from conflicting obsolete remote branches. 2010-09-14 15:45:38 -04:00
Joey Hess 0ff945ddf1 external: Disable RPC::XML's "smart" encoding, which sent ints for strings that contained only a number, fixing a longstanding crash of the rst plugin. 2010-09-14 15:37:45 -04:00
Joey Hess e0898ae1a8 blogspam: Fix crash when content contained utf-8.
I also tried setting RPC::XML::ENCODING but that did not prevent the crash,
and it seems that blogspam.net doesn't like getting xml encoded in unicode,
since it mis-flagged comments as spammy that way that are normally allowed
through.
2010-09-14 15:23:28 -04:00
Joey Hess 24ff4a9e5f revert accidentially committed change 2010-09-13 12:49:31 -04:00
Joey Hess c4ebdd6f46 Pass array of names of files that have been deleted to needsbuild hook as second parameter, to allow for plugins that needs access to this information earlier than the delete hook. 2010-09-10 17:17:08 -04:00
Joey Hess 163fc34db7 use warn 2010-09-10 14:20:53 -04:00
Joey Hess 8c1a3595d4 avoid dups getting into @slavelanguages
This could happen if checkconfig was run twice, I think.
2010-09-10 14:12:59 -04:00
Joey Hess 23f8869009 po: Auto-upgrade old format settings to new formats when writing setup file. 2010-09-10 14:04:43 -04:00
Joey Hess fbfda5ccfc po: Make the po_master_language use a langpair like "en|English", so it can be configured via the web. 2010-09-10 13:13:00 -04:00
Joey Hess 400aabe82d po: Allow enabling via web setup.
The only unsafe thing should be that enabling it with some languages will
generate po files.
2010-09-10 11:45:59 -04:00
Paul Menzel 7415aee9cc teximg: Use Unicode UTF-8 encoding by default.
If I am not mistaking all source files in ikiwiki are encoded in Unicode UTF-8.
Adding `\usepackage[utf8]{inputenc}` enables LaTeX to deal with the encoding.
As a consequence some special characters like umlauts can be used in the source
code which is useful for foreign languages.

        [[!teximg code="a = b \text{ für alle } b \neq 2"]]

But for example »≠« cannot be used in LaTeX right now. One has to use other TeX
systems like XeTeX or LuaTeX featuring native UTF-8 support or use additional
nonstandard packages like uniinput [1].

I used the package `inputenc` (`texdoc inputenc`) and not `inputenx` (`texdoc
inputenx`), because I have not used `inputenx` that much and using the option
`math` is not supported in Debian (and I guess other distributions too) since
`inpmath` is not included in CTAN.

[1] http://wiki.neo-layout.org/browser/latex/Standard-LaTeX

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
2010-09-09 18:21:33 -04:00
Joey Hess 8a6f4a7e50 needsbuild hook interface changed; the hooks should now return the modified array of things that need built. (Backwards compatability code keeps plugins using the old interface working.) 2010-09-07 12:08:59 -04:00
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 8135d2a9eb remove dead code 2010-08-30 17:38:00 -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 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 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 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 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
Joey Hess 7a04e2d416 add getsetup hook 2010-07-14 14:47:29 -04:00
Joey Hess d420a4bdec add section to getsetup info 2010-07-14 14:47:17 -04:00
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
intrigeri 4449a70214 po: check validity of po_slave_languages array. 2010-07-11 12:28:02 +02:00
intrigeri 98cc9460ac po: added an optional target percentage to needstranslation 2010-07-11 11:58:09 +02:00
intrigeri d6f9d77431 Merge remote branch 'upstream/filter-full' into prv/po 2010-07-11 11:04:59 +02:00
intrigeri 4a1cb092ba Revert po vs. template kludges.
This reverts commits dcd57dd5c9,
d4136aea8a and
d877b9644b.
2010-07-11 11:03:41 +02:00
intrigeri c99d26030e Merge remote branch 'upstream/master' into prv/po
Conflicts:
	IkiWiki/Plugin/po.pm
	doc/plugins/po.mdwn
2010-07-11 10:46:18 +02: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