Joey Hess
7e95723dad
avoid hitting the shell with system()
2008-11-05 14:45:45 -05:00
Joey Hess
9bedf53c0f
another reason to require rebuilds (and not be marked safe)
...
the plugin changes html filenames, so requiring a manual transition to
enable
2008-11-05 13:57:48 -05:00
Joey Hess
127a8a3701
Merge commit 'intrigeri/po'
2008-11-05 13:50:26 -05:00
Joey Hess
42b4abee1d
use error for two messages
2008-11-05 01:38:36 -05:00
intrigeri
c7fbcf6c5e
po plugin: slave pages link to the master's discussion page
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-03 00:52:27 +01:00
intrigeri
9bd3262f50
po plugin: replace %hash=undef with undef %hash
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 23:12:43 +01:00
intrigeri
773de05a7a
po plugin: force utf-8 encoding in POT files
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 21:35:52 +01:00
intrigeri
2ebc0bb82d
po plugin: fix linking from a translation to its master page
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 20:08:38 +01:00
intrigeri
37a9e64291
po plugin: fix targetpage for home page's translations
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:54:53 +01:00
intrigeri
439ba4490a
po plugin: removed last (?) bit of deprecated custom hook
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:51:00 +01:00
intrigeri
950c29679d
po plugin: replace targetpage hook with wrapper function
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:48:56 +01:00
intrigeri
439a2d3c44
Revert "added the targetpage hook"
...
This reverts commit fc299df955
.
Such functionality can now be achieved using the inject() function.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:34:10 +01:00
intrigeri
307d11541a
po plugin: replace tweakurlpath hook with a wrapper function
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:29:23 +01:00
Joey Hess
d71caffb7b
preprocess text before htmlizing it
2008-11-02 12:21:15 -05:00
intrigeri
7c173aca3e
Revert "added hook urlpath" and "rename urlpath hook into tweakurlpath..."
...
This reverts commits d9b9022c13
and
39d44d443d
. This functionality should now be
achieved using the new inject() function.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 18:08:50 +01:00
intrigeri
502a3433c4
po plugin: replace tweakbestlink hook with a wrapper function
...
... thanks to the new inject() feature.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 17:56:15 +01:00
intrigeri
fafa98ea96
disable istranslatable memoization
...
It makes some test cases cry once every two tries; this may be related to the
artificial way the testsuite is run, or not. In the meantime, stop memoizing
this function.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-02 16:44:42 +01:00
intrigeri
7713653878
Merge commit 'origin/master' into prv/po
2008-11-02 13:11:00 +01:00
Joey Hess
bb841f94f4
format: New plugin, allows embedding differntly formatted text inside a page (ie, otl inside a mdwn page, or syntax highlighted code inside a page).
2008-10-31 16:42:20 -04:00
Joey Hess
ae0a9d50be
set ctime in --render mode if not known
...
Avoids some uninitialised value warnings.
2008-10-30 14:50:33 -04:00
Joey Hess
354d22e27b
don't rely on plugin load order when determining generated directives
...
Instead, shortcuts will explicitly be marked as such when registered, and
listdirectives can filter them out.
2008-10-30 13:41:19 -04:00
Joey Hess
33a0e84ddb
fix preview of shortcuts
...
Move shortcut processing back to checkconfig, and avoid it failing if the
srcdir is not defined.
2008-10-29 14:20:31 -04:00
Joey Hess
5b7677faba
fix display of error msg
2008-10-29 13:38:26 -04:00
Joey Hess
8530e827b0
git: Allow [[sha1_commit]] to be used in the diffurl, to support cgit.
2008-10-27 14:45:54 -04:00
Joey Hess
d3d3999410
do no-op post_commit test in wrapper
...
This speeds up web commits by 1/4th of a second or so, since perl does
not have to start up for the post commit hook.
perl's locking is completly FuBar, since it's impossible to tell what perl
flock() really does, and thus difficult to write code in other languages
that interoperates with perl's locking. (Let alone interoperating with
existing fcntl locking from perl...)
In this particular case, I think I was able to find a way to avoid the
insanity, mostly. The C code does a true flock(2), and if perl is using an
incompatable lock method that does not use the same locking primative at
the kernel level, then the C code's test will fail, and it will go ahead
and run the perl code. Then the perl code's test will test the right thing.
On Debian, at least lately, perl's flock() does a true flock(2), so the
optimisation does work.
2008-10-26 15:13:04 -04:00
Joey Hess
7ddea03684
move untrusted committer test into the wrapper
...
This saves around 1/4th second per trusted commit since ikiwiki
doesn't need to start up.
2008-10-26 14:03:18 -04:00
Joey Hess
4a7ac5c251
remember how to write C code
...
been a while!
2008-10-24 15:49:55 -04:00
Joey Hess
146192d5b0
the pre-receive wrapper needs to be suid after all
...
It needs to write to the user db.
2008-10-24 15:47:42 -04:00
Joey Hess
761dee41b1
export CALLER_UID
2008-10-24 15:46:29 -04:00
Joey Hess
739e2ca0b4
can't lock wiki due to permissions (probably)
...
luckily, don't really need to here
2008-10-24 15:02:54 -04:00
Joey Hess
1a883b3c50
include temp file for attachment change too
2008-10-24 13:44:03 -04:00
Joey Hess
0196e1f9fc
updates
2008-10-24 13:29:41 -04:00
Joey Hess
fbcb8553df
really fix calls to check_can*
2008-10-24 13:29:30 -04:00
Joey Hess
85f4b99710
untrusted committers code seems to be fully working
...
Still need to investigate possible races, and test some more.
2008-10-23 18:05:57 -04:00
Joey Hess
f349e4ef36
fix calls to check_*
...
These throw errors, do not have useful return codes.
2008-10-23 18:05:12 -04:00
Joey Hess
ad9e443f22
check_canattach hooked up
2008-10-23 16:56:40 -04:00
Joey Hess
4669eab596
more work on untrusted committers
...
Wired up check_canedit and check_canremove, still need to deal with
check_canattach, and test.
2008-10-23 16:29:50 -04:00
Joey Hess
094af3d113
initial support for git repos with untrusted committers
...
Still need to wire up the calls to check_* , but it's cold out here and my
hands are going numb, so enough for now.
2008-10-22 20:52:34 -04:00
Joey Hess
e75818572f
function injection overhaul
...
Add an inject function, that can be used by plugins that want to replace
one of ikiwiki's functions with their own version. (This is a scary thing
that grubs through the symbol table, and replaces all exported occurances
of a function with the injected version.)
external: RPC functions can be injected to replace exported functions.
Removed the stupid displaytime hook, and use injection instead.
2008-10-21 17:57:19 -04:00
Joey Hess
327adadf04
disable warnings when redefining functions
2008-10-21 17:03:08 -04:00
Joey Hess
ee1ccfa863
use relativedate as the css class for dates that should display relative
2008-10-20 19:22:22 -04:00
Joey Hess
a2839de936
tag: When tagpage is set, force the links created by tagging to point at the toplevel tagpage, and not closer subpages.
...
The html links already went there, but internally the links were not
recorded as absolute, which could cause confusing backlinks etc.
For example, with tagbase=tags, if blog/tags/bar existed and blog/foo was
tagged bar, it would link to /tags/bar. But, the link would be recorded
simply as a link to tags/bar, and so later blog/tags/bar would appear to
have the backlink.
2008-10-20 18:17:03 -04:00
Joey Hess
5e52bfb2e7
inline: Only the last feed link was put on the page, fix this to include all feed links. So rss will be included along with atom, and pages with multiple feeds will get links added for all feeds.
2008-10-20 15:25:45 -04:00
intrigeri
fadb26bc15
Merge commit 'origin/master' into prv/po
2008-10-20 14:33:19 +02:00
Joey Hess
423fae6f18
Use the pure perl Data::Dumper when generating setup files to ensure that utf-8 characters are written out as such, and not as the encoded perl strings the C Data::Dumper produces.
...
Note that the text produced by the C version was interpreted fine
when ikiwiki loaded the setup file. But it was not user-friendly.
2008-10-19 21:23:48 -04:00
Joey Hess
3e992b758b
Fix issue with utf-8 in wikiname breaking session cookies, by entity-encoding the wikiname in the session cookie.
2008-10-19 21:07:12 -04:00
Joey Hess
fd9393ef85
add displaytime hook
...
Need to use a hook because an exported function cannot be reliably
overridden. The replacement verstion was actually only affecting plugins
loaded after it.
formattime doesn't need a hook, since there's no reason to export it.
2008-10-19 20:12:37 -04:00
Joey Hess
db146d9f1e
need to use localtime, fix width
2008-10-19 19:39:32 -04:00
Joey Hess
2b569f99d9
fix relativedate timezone inclusion
...
The machine parseable date needs to include a timezone.
Also, simplified the interface for date display.
2008-10-19 19:21:44 -04:00
Joey Hess
2321906cd7
mark up date so relativedate will work
2008-10-19 15:17:00 -04:00