intrigeri
5575786803
po: abstract "doing something for the same page in every other language"
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 14:55:21 +01:00
intrigeri
532ec56a5f
po: abstract implementation details for %translations building and resetting
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 13:56:46 +01:00
intrigeri
3174b4c6f3
po: abstract %filtered implementation details
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 13:51:00 +01:00
intrigeri
00732f19b9
po: clarify error messages
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 13:22:50 +01:00
intrigeri
6fc898df75
po: clarify code with some comments
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 13:14:42 +01:00
intrigeri
aef1b0f503
po: prevent a slave page to depend on itself
...
It has never caused harm yet, but it might in the future.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-10 12:48:27 +01:00
intrigeri
646d7bf6a3
po(refreshpot): define the input charset before read()'ing
...
... to prevent the use of Encode::Guess::guess_encoding() in
Locale::Po4a::Transtractor (just a minor security measure, dependent on po4a
internals, but we have no reason to think Encode::Guess is not safe).
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-08 21:32:04 +01:00
intrigeri
f652af11fd
Merge commit 'upstream/master' into pub/po
2008-11-07 22:19:34 +01:00
intrigeri
a0ac346079
po: finished backlinks implementation
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 22:17:54 +01:00
intrigeri
34ab884242
po: implemented linking/backlinks specification for po_link_to=negotiated
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 21:27:00 +01:00
intrigeri
3e341e64c2
po: added pofiles() function, will use this soon
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 21:23:23 +01:00
intrigeri
4879a7f033
po: add comments
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-07 16:33:10 +01:00
Joey Hess
11d377af81
txt: Do not encode quotes when filtering the txt, as that broke later parsing of any directives on the page.
2008-11-06 20:49:18 -05:00
Joey Hess
db5ea4d4f0
meta: Plugin is now enabled by default since the basewiki uses it.
2008-11-06 16:08:11 -05:00
Joey Hess
ecf2399f4f
aggregate: Try to query XML::Feed for the base url when derelevatising links. Since this needs the just released XML::Feed 0.3, as well as a not yet released XML::RSS, it will fall back to the old method if no xml:base info is available.
2008-11-06 16:05:10 -05:00
intrigeri
daa04ae436
po: fix link to homepage in special case
...
... by wrapping IkiWiki::urlto in order to workaround hard-coded
/index.$config{htmlext}, which is wrong when usedirs=0 and po_link_to=current
and translatable homepage
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 17:28:04 +01:00
intrigeri
8b001dbb00
po: redesign (once more) automatic POT/PO files update
...
Now use the change hook to update these files, check them into VCS, and trigger
IkiWiki::refresh as needed. The needsbuild hook's help was required to prevent
infinite looping.
This more rigorous way of doing this fixes recentchanges (that was previously
not updated in some cases), and probably is a better long-term solution than the
two previously tested ones.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 15:54:55 +01:00
intrigeri
802be94104
po: use prep_writefile before creating any files in refreshpot and refreshpo
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 14:17:33 +01:00
intrigeri
10af328ff1
po: syntax warning fix
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 14:08:33 +01:00
intrigeri
7ad5c5cbdc
po: fixed whitespace
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:55:03 +01:00
intrigeri
769be3d48e
po: po_link_to is safe, and fallbacks to a working value if needed
...
warnings are displayed if it is set to an invalid or incompatible value
(e.g. po_link_to=negotiated and disabled usedirs)
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:47:09 +01:00
intrigeri
419de149a6
po: mark po_translatable_pages as a safe configuration setting
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:29:48 +01:00
intrigeri
34afa2c07d
po: po_master_language and po_slave_languages are safe config settings
...
... and check their validity in checkconfig
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:26:45 +01:00
intrigeri
c96dd00480
po: added license and copyright
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 13:01:33 +01:00
intrigeri
1f54c13ec2
Merge commit 'upstream/po' into prv/po
...
Conflicts:
IkiWiki/Plugin/po.pm
doc/plugins/po.mdwn
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-06 12:28:31 +01:00
Joey Hess
17bd930bc9
first pass over code
...
Only change of note is quoting some strings in a regexp, just in case
(also avoids the . matching any character!)
Mostly whitespace changes of no consequence.
2008-11-05 15:18:07 -05:00
Joey Hess
ae37bca0e2
backup refs to injected subs later
...
In case two plugins both inject replacements for these subs,
backup the ref just before injecting to make sure the most
recent version is seen.
2008-11-05 15:09:54 -05:00
Joey Hess
9b16e7f148
minor layout changes
2008-11-05 15:09:04 -05:00
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
3e0c52c524
po plugin(filter): redesign temp file management
...
... in a way compatible with various File::Temp versions.
The result is far from being perfect (see comments in the code for details),
but it does work.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-05 01:36:44 +01:00
intrigeri
4c6c00ccdf
Merge commit 'upstream/master' into prv/po
2008-11-04 23:39:15 +01:00
intrigeri
225e21f6c5
po plugin: redesign refresh mechanism after master page update
...
manually triggering IkiWiki::refresh() was at least dubious, and more or less
buggy (it randomly broke the whole backlinks feature); thinking a bit more to
add the necessary bits to @needsbuild seems like a better way. don't play with
ikiwiki's internals if not absolutely needed.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-04 23:32:32 +01:00
intrigeri
bc5b875de8
po plugin: remove broken parentlinks for home page's translations
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-04 20:05:21 +01:00
intrigeri
cfcb7454db
po plugin: aesthetics
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-04 19:23:58 +01:00
intrigeri
c731a81b43
po plugin: fix preview for PO files
...
As a trick, use editcontent hook to mark the page as unfiltered, to force our
filter() sub's to proceed again.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-11-04 18:24:43 +01: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
intrigeri
8211910566
po plugin: set every configuration item to unsafe
...
We will check later which ones are actually safe enough for websetup.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-19 17:19:42 +02:00
intrigeri
f096a9d798
po plugin: added ISTRANSLATION and ISTRANSLATABLE template variables
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-19 00:05:13 +02:00
intrigeri
629968fc89
po plugin(refreshpot): prevent PO references to be written
...
... else we can fall into some kind of nasty infinite loop, when two ikiwiki
instances don't store their working copy of the repository at the same place:
every POT file update in one repository would trigger an update of the same POT
file in the others repository, and so on.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 21:47:49 +02:00
intrigeri
a0deb3038c
po plugin: do not allow msgmerge to create backup files
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 19:18:22 +02:00
intrigeri
892809bb53
po plugin: only refresh private module variables when needed
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:13 +02:00
intrigeri
7b7865150f
po plugin: add correct dependencies on pages using OTHERLANGUAGES
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:13 +02:00
intrigeri
1aad01f841
po plugin: bugfix (OTHERLANGUAGES)
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri
1d76762517
po plugin: initial implementation of automatic POT/PO update
...
The updated or created PO files are put under version control.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri
1e69eb482f
po plugin: rebuild %translations after having created missing POT/PO files
...
This is not needed yet, but when newly created POT/PO files are added to
%pagesources and other data structures, we'll need this.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri
58c77a01f7
po plugin: create missing POT/PO files in needsbuild hook
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri
6add615928
po plugin: added and documented PERCENTTRANSLATED template variable
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri
1a670d3aca
po plugin: make translation percentage available in OTHERLANGUAGES loop
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri
8867316125
po plugin: added currentlang() custom PageSpec function
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:12 +02:00
intrigeri
ce9db89896
po plugin: added lang() custom PageSpec function
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:11 +02:00
intrigeri
d4f787ef52
po plugin: make any slave page dependent on the corresponding master page
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:11 +02:00
intrigeri
a8e8613fa1
po plugin: bugfix - only refresh POT/PO for translatable pages
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:11 +02:00
intrigeri
dc74c8e577
po plugin: do not trust po4a functions return value
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:11 +02:00
intrigeri
6424d748a4
po plugin: refresh PO files when a master page is updated
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:11 +02:00
intrigeri
d5b5cfb8e4
po plugin: refresh POT files when a master page is updated
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:11 +02:00
intrigeri
bd237d48cf
po plugin: build %translations in needsbuild hook rather than scan
...
... because we'll need this data to refresh POT/PO files in needsbuild hook
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:11 +02:00
intrigeri
a28559798a
po plugin: created OTHERLANGUAGES template loop
...
It currently only provides basic translations/master pages links.
Updated documentation accordingly.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:10 +02:00
intrigeri
32cc0b336a
po plugin: po_slave_languages is a hash, rather than a hash of hashes
...
The latter seems to be unsupported by ikiwiki config system.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:10 +02:00
intrigeri
ae827a43f8
po plugin: build %translations at scan time
...
... so that we can consider it as complete at preprocess time
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:10 +02:00
intrigeri
08df9dcef7
po plugin: memoize istranslatable and _istranslation
...
Both functions are called very often, and:
- istranslatable has no side effect
- _istranslation is the helper function, without any side effect, for the
istranslation function
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:10 +02:00
intrigeri
1e874b3f0a
po plugin[filter]: avoid converting more than once per destfile
...
Only the first filter function call on a given {page,destpage} must convert it
from the PO file, subsequent calls must leave the passed $content unmodified.
Else, preprocessing loops are the rule.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:10 +02:00
intrigeri
52728bb6ea
po plugin: bugfix (calling function in wrong module)
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:10 +02:00
intrigeri
458ccebdd3
po plugin: added *.pot to wiki_file_prune_regexps
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:10 +02:00
intrigeri
e163b037bf
po plugin: move translatable pages to setup file, refactor
...
Replaced [[!translatable]] directive with po_translatable_pages setting.
Moved istranslatable/istranslation code to helper functions leaving place for
future caching and/or memoization. The PageSpec functions still work.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:10 +02:00
intrigeri
ffd1fff775
po plugin: allow pagestate update (bugfix)
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:09 +02:00
intrigeri
b0b87d1584
po plugin: respect documented convention to store pagestate
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:09 +02:00
intrigeri
79d6f52d30
po plugin: implemented po_link_to=current
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:09 +02:00
intrigeri
0791e5afe3
po plugin: added istranslatable() pagespec function, and use it
...
(do not name non-translatable pages index.LL.html)
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:09 +02:00
intrigeri
fdc7974b2a
po plugin: implemented po_link_to=negotiated
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:09 +02:00
intrigeri
e82c6b1908
po plugin: implement linking specification in one of the main cases
...
i.e. in case usedirs is enabled and po_link_to_current_language is disabled
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:09 +02:00
intrigeri
c8330da6c0
po plugin: add po_link_to_current_language option, check config
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:08 +02:00
intrigeri
1975d4d35f
po plugin: use pagespec_match() instead of direct match_istranslation calls
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:08 +02:00
intrigeri
258c49ae55
po plugin: added [[!translatable]] directive
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:08 +02:00
intrigeri
d9b9022c13
added hook urlpath
...
This hook can be used to modify the internal urls generated by ikiwiki.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:08 +02:00
intrigeri
bd50ba3e83
po plugin: switch to page.LL.html naming convention
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:08 +02:00
intrigeri
45d08022bb
po plugin: name rendered master pages like slave ones (page.html.LL)
...
Apache's content negotiation transparently redirects any old URL (page.html) to
the new one, depending on the client preferred language (i.e. a German browser
will be fed with page.html.de). Transition to this naming convention is then
really smooth.
This naming convention allows one to deliberately display the master page, even
if her browser is configured for another language.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:07 +02:00
intrigeri
b90f8397f6
po plugin: reworked available options
...
- renamed po_supported_languages to po_slave_languages
- added po_master_language option, which will soon be useful
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:07 +02:00
intrigeri
575d4021e3
po plugin: htmlize translated content as if it was the same type as the master page
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:07 +02:00
intrigeri
1b5f610a97
po plugin: convert PO to master page's type in filter hook
...
Master page's type htmlize hook should also be run in po's htmlize hook,
but let's proceed step by step.
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:07 +02:00
intrigeri
75fc44ce2f
po plugin: factorize most checks into a new match_istranslation PageSpec
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:07 +02:00
intrigeri
50f1fd43da
po plugin: initial work
...
- .po is a new supported wiki page type
- PO files are rendered verbatim into HTML
- override targetpage to ease Content Negotiation
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:07 +02:00
intrigeri
fc299df955
added the targetpage hook
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-10-18 15:49:07 +02:00
Joey Hess
cb9a695443
fix url
2008-10-17 22:04:43 -04:00
Joey Hess
35c56622ea
tweak recentchanges permalink code
...
Need to handle the case where url is not set.
2008-10-17 21:54:42 -04:00
Joey Hess
fdb5da46b0
Patch for anchor-based change permalinks in recent changes feed
...
from JasonBlevins
2008-10-17 21:49:55 -04:00
Joey Hess
745dc1c62f
add missing getsetup hook
2008-10-17 21:29:05 -04:00
Joey Hess
02ec92c6cb
make relativedate work for the dates on the recentchanges page
...
Having a always current relative date on recentchanges is very, very nice.
2008-10-17 21:21:07 -04:00
Joey Hess
7390a7a072
relativedate: New javascript-alicious plugin that makes all dates display relative, in a very nice way, if I say so myself.
2008-10-17 20:47:32 -04:00
Joey Hess
79b376f991
Add an underlay for javascript, and add ikiwiki.js containing some utility code.
...
* Add an underlay for javascript, and add ikiwiki.js containing some utility
code.
* toggle: Stop embedding the full toggle code on each page using it, and
move it to toggle.js in the javascript underlay.
2008-10-17 20:28:18 -04:00
Joey Hess
f36080ae02
aggregate: Avoid bug that caused immediate expiration of items with a date in the future.
2008-10-16 18:20:16 -04:00
Joey Hess
78a69e5bd6
only darcs add files not yet in version control
2008-10-16 17:20:17 -04:00
Joey Hess
7eb512205f
updated from pesco's darcs repo, current to Oct 11 version
2008-10-15 19:38:21 -04:00
Joey Hess
1f7f5d5e0e
Merge branch 'master' into darcs
2008-10-15 19:36:48 -04:00
Joey Hess
b8f4b9c799
inline: Use the feed's description in the rss and atom links. Closes : #502113
2008-10-15 14:45:28 -04:00
Joey Hess
02e39bf704
fix prototype
2008-10-14 15:47:19 -04:00
Joey Hess
c39112e6ef
inline: Allow MTIME to be used in inlinepage.tmpl.
2008-10-14 15:00:46 -04:00
Joey Hess
3b27af4a29
Pass HTTPS variable through the wrapper so that CGI->https can be used by plugins. Closes : #502047
2008-10-13 12:32:16 -04:00
Joey Hess
643c0f1afc
optimise url parsing and add guard against failure to parse
2008-10-10 17:09:33 -04:00
Peter Simons
f9957d11ed
google plugin: Use google.com to search the local site.
...
Google allows has a nice feature, sitesearch, that allows anyone to
limit search results to a specific site. Obviously, this feature can be
used to provide a search engine for the local ikiwiki site without the
need to install any additional software. Just enable the 'google' plugin
and make sure that --url uses the proper hostname. Thanks to Joey for
helping to get the Perl implementation right.
2008-10-10 17:05:02 -04:00
Joey Hess
a473cb2f74
orphans: Fix unquoted page name in regexp.
2008-10-09 19:09:16 -04:00
Joey Hess
d3ca495e61
lockedit: Support specifying which users (and IP addresses) a page is locked for. This supports most of the ACL type things users have been wanting to be done. Closes : #443346 (It does not control who can read a page, but that's out of scope for ikiwiki.)
2008-10-08 17:47:38 -04:00
Joey Hess
1e17ea0b65
avoid $_ in a few other for loops
...
These were probably not currently buggy, but let's avoid bugs being
introduced by the functions called clobbering $_.
2008-10-06 16:19:54 -04:00
Joey Hess
fea76a11bc
remove: Avoid $_ breakage. (Stupid, stupid perl.)
...
This avoids another one of those $_ scoping issues where a deep call to a
function that changes $_ clobbers the array that is being looped over.
2008-10-06 16:10:47 -04:00
Joey Hess
3b47dae9ca
remove, rename: Allow acting on attachments as a page is being created.
2008-10-02 12:53:53 -04:00
Joey Hess
c945952381
attachment: Support adding attachments to pages even as they are being created.
2008-10-02 12:48:06 -04:00
Joey Hess
e0fd02acf1
don't special case preview
...
Whenever the edit form is submitted, but not saved, the page location
select should reduce to the currently selected value. This was only done
when previewing before, but is also needed in order to support the case of
adding an attachment to a page that is just being created.
Before this change, the attachment plugin would get a weird value in
$form->field("page"), that did not reflect the actual page location.
2008-10-02 12:42:46 -04:00
Joey Hess
bf386e22f5
inline: Fix handling of rootpage that doesn't exist.
...
It makes sense to use bestlink to determine which page rootpage refers to,
but if no page matches, just use the raw value.
2008-10-01 17:29:03 -04:00
Joey Hess
917f54a777
add pesco's darcs plugin
2008-10-01 17:24:06 -04:00
Joey Hess
826af4600a
fix subpage rename bug with indexpages
...
If indexpages is enabled, then foo/index.mdwn will look like a subpage
of foo, so an additional check is needed to avoid trying to rename it
twice.
2008-10-01 14:43:28 -04:00
Joey Hess
733171bf3f
support indexpages
2008-09-29 19:08:12 -04:00
Joey Hess
121efb246f
Removed the pagefile function, which was confusingly close in name to
...
newpagefile.
Note that newpagefile is not used here (or in recentchanges) because
the internal use pages they generate are transient and unlikely to
benefit from being put each in their own subdir.
2008-09-29 18:59:20 -04:00
Joey Hess
2ba168ac83
use newpagefile
2008-09-29 18:52:42 -04:00
Joey Hess
a7fd6debc5
support indexpages when renaming pages
...
Note that the page filename code used here and in editpage are identical..
2008-09-29 18:29:53 -04:00
Joey Hess
40007b8111
support indexpages when creating new pages
...
Initial draft, may need to factor new page filename code out into helper
function if other plugins need to do the same..
2008-09-29 18:19:44 -04:00
Joey Hess
bb4211e326
avoid unnecessarily rebuilding pages with complex conditionals
...
I noticed that ikiwiki/formatting was beilg rebuilt when any page changed.
This turned out to be because it contained a complex conditional
"enabled(foo) or enabled(bar)", and the conditional plugin did not notice
that this consisted only of enabled() tests, and copied it unchanged into
add_depends. Thus, the page's dependencies were satisfied by any page
change.
The fix is to beef up the parser so that it can handle that and more
complex conditionals, and detect if they consist only of such tests.
2008-09-29 18:05:39 -04:00
Joey Hess
6b01fca253
use gettext
2008-09-29 17:06:56 -04:00
Joey Hess
c4be16703f
fix handing of case of file first created by preview but then saved
...
To handle this, avoid populating %renderedfiles in preview,
and in expiry, check if the file is in %renderedfiles, if it is
do not delete it since it was saved.
2008-09-29 13:25:31 -04:00
Joey Hess
2ff3c8aee7
editpage: Be more aggressive (and less buggy) about cleaning up temporary files rendered during page preview.
2008-09-27 18:02:33 -04:00
Joey Hess
61426a7186
Reorganize index file, add a format version field.
...
Upgrades to the new index format should be transparent.
The version field is 3, because 1 was the old textual index, 2 was the
pre-versioned format.
This also includes some efficiency improvements to index loading, by
not copying a hash and using a reference.
2008-09-27 16:35:56 -04:00
Joey Hess
55a0361a47
template: Make edit link for new templates ensure the page is located under toplevel templates directory.
2008-09-27 15:18:36 -04:00
Joey Hess
67f38832aa
htmltidy robustness fixes
...
* htmltidy: Avoid returning undef if tidy fails. Also avoid returning the
untidied content if tidy crashes. In either case, it seems best to tidy
the content to nothing.
* htmltidy: Avoid spewing tidy errors to stderr.
2008-09-27 14:27:42 -04:00
Joey Hess
9ec9d6901d
Export pagetitle, titlepage, linkpage.
2008-09-27 14:27:42 -04:00
Joey Hess
bfab23ce33
typo
2008-09-27 14:27:42 -04:00
Joey Hess
316ef6571b
pagetype is exported
2008-09-27 13:34:46 -04:00
Joey Hess
7351d545d9
Merge commit 'smcv/beautify'
...
Conflicts:
IkiWiki/Plugin/recentchanges.pm
Note that smcv's approach of using urlto also gets the url right when
redirecting to a non-html file, which is a better approach than my recent
fix to recentchanges
2008-09-27 13:00:48 -04:00
Joey Hess
f181962dfc
typo
2008-09-27 12:50:39 -04:00
Joey Hess
89256ab870
htmlscrubber: Add a config setting that can be used to disable the scrubber acting on a set of pages.
2008-09-26 18:07:37 -04:00
Joey Hess
83429adf04
decode utf-8 in recentchanges_link parameter
2008-09-26 15:40:01 -04:00
Joey Hess
bce2a34c19
tag: Make edit link for new tags ensure that the tags are created inside tagbase, when it's set.
2008-09-25 20:25:07 -04:00
Joey Hess
965f7310fe
git: Fix handling of utf-8 filenames in recentchanges.
...
Seems that the problem is that once the \nnn coming from git is converted
to a single character, decode_utf8 decides that this is a standalone
character, and not part of a multibyte utf-8 sequence, and so does nothing.
I tried playing with the utf-8 flag, but that didn't work. Instead, use
decode("utf8"), which doesn't have the same qualms, and successfully
decodes the octets into a utf-8 character.
Rant:
Think for a minute about fact that any and every program that parses git-log,
or git-show, etc output to figure out what files were in a commit needs to
contain this snippet of code, to convert from git-log's wacky output to a
regular character set:
if ($file =~ m/^"(.*)"$/) {
($file=$1) =~ s/\\([0-7]{1,3})/chr(oct($1))/eg;
}
(And it's only that "simple" if you don't care about filenames with
embedded \n or \t or other control characters.)
Does that strike anyone else as putting the parsing and conversion in the
wrong place (ie, in gitweb, ikiwiki, etc, etc)? Doesn't anyone who actually
uses git with utf-8 filenames get a bit pissed off at seeing \xxx\xxx
instead of the utf-8 in git-commit and other output?
2008-09-25 18:26:42 -04:00
Joey Hess
e1ba137317
attachment: Add admin() pagespec to test if the uploading user is a wiki admin.
2008-09-25 16:49:30 -04:00
Joey Hess
093e815440
aggregate: Avoid uninitialized value warnings for pages with no recorded ctime.
...
I saw this in the wild, apparently a page was not present on disk, but was
in the aggregate db, and not marked as expired either. Not sure how that
happened, but such pages should get marked as expired since they have an
effectively zero ctime.
2008-09-25 15:38:51 -04:00
Joey Hess
3f5ba52ee0
recentchanges: Fix redirects to non-page files.
2008-09-25 13:46:12 -04:00
Joey Hess
e00df8575f
rename: Hide type field from rename form when renaming attachments.
2008-09-23 19:31:34 -04:00
Joey Hess
40dc92a67b
multiple rename support is working
...
most edge cases seem handled too
2008-09-23 19:21:05 -04:00
Joey Hess
544da9b0da
Merge branch 'master' into tova
2008-09-23 17:42:38 -04:00
Joey Hess
8e0180d8ca
rename, remove: Don't rely on a form parameter to tell whether the page should be treated as an attachment.
2008-09-23 17:41:05 -04:00
Joey Hess
cf4db49567
factor out fixlinks
2008-09-23 17:26:46 -04:00
Joey Hess
9b57602394
factor out do_rename
2008-09-23 17:04:01 -04:00
Joey Hess
9cbc46f49a
add checkbox to rename subpages too
2008-09-23 16:56:57 -04:00
Joey Hess
8494104b39
layout
2008-09-23 14:57:13 -04:00
Joey Hess
9cbcda14ac
Print a debug message if a page has multiple source files.
2008-09-23 13:32:41 -04:00
Joey Hess
a32c0ecd51
include perl error in warning about openid
...
it may be some other module missing, this way you can tell by reading the
log
2008-09-23 12:59:43 -04:00
Simon McVittie
c7804cafa5
Fix typo in skeleton.pm.example: sessionncgi (with extra n)
...
(cherry picked from commit 72ffc85d6acb8b99839ac98a2c23dbef410b5666)
2008-09-23 12:47:02 -04:00
Simon McVittie
7f82594410
remove: redirect via urlto(), avoiding mentions of index.html
2008-09-21 18:26:48 +01:00
Simon McVittie
02923917c8
recentchanges: construct redirections via urlto(), avoiding mentions of index.html
2008-09-21 18:26:48 +01:00
Simon McVittie
97e3263ad1
poll: Use urlto to produce redirection URLs, avoiding mentions of index.html
2008-09-21 18:26:48 +01:00
Simon McVittie
e73987b01d
editpage: beautify redirection URLs, avoiding exposing the implementation detail that index.html exists
2008-09-21 18:26:42 +01:00
Joey Hess
4c68e149e5
handle templates with special characters in name
...
The template field is really a link, so needs to be converted to a page
name in stored state.
2008-09-20 23:00:19 -04:00
Joey Hess
5e713047b4
avoid uninitialised value warning
2008-09-20 22:51:42 -04:00
Joey Hess
12eb585353
add missing page name sanity check
2008-09-20 22:48:22 -04:00
Joey Hess
748d375954
avoid warning if percent value is not numeric
2008-09-20 16:31:27 -04:00
Joey Hess
84347a1247
avoid duplicate template lookup
2008-09-20 16:23:15 -04:00
Joey Hess
6088ad861c
revert colon part of change
2008-09-20 16:21:04 -04:00
Joey Hess
a6fc3b411f
edittemplate patch from Willu
...
* edittemplate: Default new page file type to the same type as the template.
(willu)
* edittemplate: Add "silent" parameter. (Willu)
* edittemplate: Link to template, to allow creating it. (Willu)
2008-09-20 16:19:09 -04:00
Joey Hess
9a9b25346d
i18n
2008-09-19 13:52:01 -04:00
Joey Hess
779c5214f3
progress: Display an error if the progress cannot be parsed, and allow the percent parameter to only optionally end with "%".
2008-09-19 13:09:50 -04:00
Joey Hess
914c92c4e1
fix check for nonexistant content
2008-09-17 18:19:52 -04:00
Joey Hess
89953e3e19
store ctime for use by expiry code
...
The expiry code does need to make sure to sort in ctime order, even if
expiring by count, so it expires the right ones.
2008-09-17 18:11:22 -04:00
Joey Hess
1cb4154bc8
aggregate: Support atom feeds with only a summary element, and no content elements.
2008-09-17 15:56:58 -04:00
Joey Hess
da7c6eb1b4
editdiff: Broken since 2.62 due to wrong syntax, now fixed.
2008-09-17 14:34:02 -04:00
Joey Hess
b540b263de
aggregate: Allow expirecount to work on the first pass. (expireage still needs to wait for the pages to be rendered though)
2008-09-17 14:27:31 -04:00
Joey Hess
ee94407891
rootpage is not a pagespec
...
So ./posts won't be interpreted right. Just "posts" should do, I think.
2008-09-14 13:50:34 -04:00
Joey Hess
bc7381c4f9
listdirectives: Enable use of the directives underlay.
2008-09-11 18:46:32 -04:00
Joey Hess
d76c8aa013
change git hook description
...
It doesn't have to be a post-update hook.
2008-09-11 15:53:25 -04:00
Joey Hess
d9d783c4bc
goodstuff update
...
* goodstuff: Remove otl plugin from the bundle since it needs a significant
external dependency and is not commonly used. If you use otl, make sure
you explicitly enable it now.
* goodstuff: Add more, progress, and table plugins to the bundle.
2008-09-09 16:11:16 -04:00
Joey Hess
5d53fab853
img: Support sizes like 200x. Closes : #475149
2008-09-09 15:20:06 -04:00
Joey Hess
6f46cc3b31
progress: New plugin to generate progress bars (willu)
2008-09-09 14:44:58 -04:00
Joey Hess
2b53de66a0
ddate: Stop clobbering timeformat when not enabled.
2008-09-08 19:40:23 -04:00
Joey Hess
f888ceafee
minor optimisation
2008-09-08 12:28:56 -04:00
Joey Hess
0f67e7d969
editpage: New core plugin factoring out page editing to allow disabling it if desired.
2008-09-05 13:57:25 -04:00
Joey Hess
7d3047b6d8
UNIVERSAL not used in this plugin
2008-09-05 13:44:52 -04:00
Joey Hess
3c022e2cd7
use yesno
2008-09-02 18:20:17 -04:00
Joey Hess
657bf7846d
table: Support header=column to make the table header be the first column of the data. (AlexandreDupas)
2008-09-02 14:57:20 -04:00
Joey Hess
b7458c48d8
filecheck: Fall back to testing for binary or plain text files if no mime type is detected.
2008-09-01 15:00:15 -04:00
Joey Hess
000c87f510
don't fail if %config is not set
2008-09-01 11:26:03 -04:00
Joey Hess
2a29641097
Set cookies HttpOnly.
2008-08-28 16:09:58 -04:00
Joey Hess
2b602e2e9f
filecheck: Fixed two bits broken in move from attachment.
2008-08-28 13:04:45 -04:00
Joey Hess
b9efeba972
humansize moved to filecheck
...
It's not used there, but it makes sense to keep it there as it's the
inverse of parsesize.
2008-08-27 15:31:48 -04:00
Joey Hess
b1d8437f8a
if extrafooter is already set, append to it
...
to interoperate with future plugins using it
2008-08-26 18:04:45 -04:00
Joey Hess
a326ffed1f
autoindex: Avoid re-adding previously deleted (or renamed) pages.
2008-08-26 14:39:47 -04:00
Joey Hess
042a057778
color: New plugin from ptecza.
2008-08-26 13:22:34 -04:00
Joey Hess
6364949dfc
remove dead code
2008-08-26 12:28:59 -04:00
Joey Hess
d06096ad0d
edittemplate: Don't wipe out edits on preview.
2008-08-25 20:51:10 -04:00
Joey Hess
78e34fbdc2
filecheck: New plugin factoring out the PageSpec additions that were originally part of the attachment plugin.
2008-08-25 19:52:34 -04:00
Joey Hess
8eb65c1ef1
update
2008-08-25 14:21:04 -04:00
Joey Hess
4956623ee6
rename plugin
...
I don't want to be stuck renameing it later if preprocessor directives are
turned into postprocessor directives. Also, "directives" is shorter and
clearer than "preprocessors".
2008-08-25 13:38:44 -04:00
Joey Hess
c62cbc31c2
indentation, style, and fixed name of preprocessor_description_dir
2008-08-25 13:36:06 -04:00
Joey Hess
029edd9b45
plugin by willu
2008-08-25 13:28:25 -04:00
Joey Hess
69e35d3c51
willu's teximg changes
...
* teximg: The prefix is configurable, and has changed to not include the
nonstandard mhchem by default. (willu)
* teximg: dvipng is used if available to render images. Its output is
antialiased and better than dvips. If not available, the old dvips+convert
chain will be used. (willu)
* Drop suggests on texlive-science, add suggests on dvipng.
2008-08-24 15:21:51 -04:00
Joey Hess
9b10f5eab2
map: The fix for #449285 was buggy and broke display of parents in certian circumstances.
...
The use of $dummy was not sufficient, because it only stuck around for the
first element after a dummy parent, and was then lost. Instead, use a
$addparent that contains the actual dummy parent, so it can be compared
with the new item to see if we're still under that parent or have moved to
another one.
2008-08-23 13:10:49 -04:00
Joey Hess
d84e43faac
fix my broken fix
2008-08-23 12:48:01 -04:00
Joey Hess
d23943ebea
fix off-by-one, and fix link
...
The link was broken if the inserted dir was not under the destpage
2008-08-23 12:37:19 -04:00
Joey Hess
15a0a151bf
fix links to inserted parent pages
...
The parent page names had "/" prepended, which caused broken links.
2008-08-23 12:28:18 -04:00
Joey Hess
3069c7b36a
fix directory uniquification code
2008-08-22 21:52:03 -04:00
Joey Hess
4643233c18
monotone updates
...
- Try to configure a wrapper
- Fix (?) ikiwiki-makerepo repo name mangling
- Add big warning about passphrases
- Doc updates
2008-08-22 00:22:02 -04:00
Joey Hess
6cf96b5819
Fix bug in wikiname sanitisation in the setup automator.
2008-08-21 23:40:11 -04:00
Joey Hess
00a4271290
improve handling of typoed or problem rcs
2008-08-21 23:07:29 -04:00
Joey Hess
5d83e7359d
graphviz: Fix breakage of the name of the preprocessor directive.
2008-08-14 14:44:30 -04:00
Joey Hess
6432d15cb4
fix a common case typo
2008-08-12 15:48:44 -04:00
Joey Hess
d50376a05d
default to looking at page source file if no file is specified
...
This will allow these pagespecs to be used a bit more generally.
2008-08-12 15:34:47 -04:00
Joey Hess
88e389ef1e
error if ping fails, rather than printing debug
2008-08-11 13:03:30 -04:00
Joey Hess
3de7d39ec6
use srcfile/destfile
...
avoids a commit message of "renamed foo to foo"
2008-08-07 16:20:35 -04:00
Joey Hess
11550f9593
avoid link fixup if page name stayed the same
2008-08-07 16:17:50 -04:00
Joey Hess
46b9a83b61
page file type rename patch from willu
2008-08-07 16:09:41 -04:00
Joey Hess
581381e335
inline: Ignore parent dirs when sorting pages by title.
2008-08-07 15:47:59 -04:00
Joey Hess
adc2eb3d8c
Options set in the setup file are now immediatly loaded by ikiwiki -setup. This allows later switches to override them. Previously, setup file options overrode most command line options.
2008-08-06 01:58:04 -04:00
Joey Hess
6fb6d51524
fix inverted test
2008-08-06 01:15:48 -04:00
Joey Hess
86660e9c82
external: Fix support for hooks called in an array context.
2008-08-06 01:05:44 -04:00
Joey Hess
9cb415f4a4
autoindex: Ignore internal pages, and take underlay directories into account. Also, avoid making index pages for directories that contain no files.
2008-08-06 00:04:05 -04:00
Joey Hess
bf8558f346
save to real setup file, and rebuild/refresh
2008-08-05 20:11:56 -04:00
Joey Hess
83888b75f1
save the full path to the setup file
2008-08-05 20:11:23 -04:00
Joey Hess
46b3f54ab6
typo
2008-08-05 19:58:33 -04:00
Joey Hess
4b4bce5006
Revert "typo"
...
This reverts commit c8d3626c51
.
2008-08-05 19:39:30 -04:00
Joey Hess
4b994ffed1
avoid forcing syslog setting
...
This avoids forcing the setting to 0 if it was not set at all.
2008-08-05 19:36:53 -04:00
Joey Hess
c8d3626c51
typo
2008-08-05 19:30:09 -04:00
Joey Hess
6e2f9e97f3
Add simple patch to silence a warning when using monotone
2008-08-04 15:00:47 -04:00
Joey Hess
e48f8ff8a9
hm
2008-08-04 14:53:11 -04:00
Joey Hess
0c3291d4f3
plugin enable/disable working and bugfixes
2008-08-03 22:16:38 -04:00
Joey Hess
a4ce6550eb
loosen qw regexp
2008-08-03 22:16:38 -04:00
Joey Hess
6d15912e8f
work around strange problem with banned_users
...
Its value was being ignored. Some kind of formbuilder bug?
Anyway, prefixing all keys with a section seems like a good idea
generally, in case there's ever overlap.
2008-08-03 21:06:13 -04:00
Joey Hess
4b79a43db6
checkboxes back
2008-08-03 20:51:46 -04:00
Joey Hess
2a712c8817
use radio, not checkbox, for booleans
...
Had to do this due to one of CGI::FormBuilder's more annoying quirks -- it
loses the value of a checkbox field with only one option, always treating
it as checked.
2008-08-03 20:20:25 -04:00
Joey Hess
3905645342
add plugin safe/rebuild info (part 3 of 3)
2008-08-03 19:36:11 -04:00
Joey Hess
219afc3f9c
support rebuild tristate
...
also some fixes to change minimisation logic
2008-08-03 18:23:17 -04:00
Joey Hess
018321f2c8
fix misc breakage from plugin safe/rebuild data addition
2008-08-03 18:17:13 -04:00
Joey Hess
39195de96e
add plugin safe/rebuild info (part 2 of 3)
...
(brain.. melting..)
2008-08-03 17:20:21 -04:00
Joey Hess
1230e914b1
anonok is safe
2008-08-03 17:03:20 -04:00
Joey Hess
1a37848346
move plugin toggles to before config setting again
2008-08-03 16:58:16 -04:00
Joey Hess
b7d6a49be4
ui improvements
2008-08-03 16:46:38 -04:00
Joey Hess
aacec52a07
show force disabled plugins in advanced mode
2008-08-03 16:43:42 -04:00
Joey Hess
903213e63f
add plugin safe/rebuild info (part 1 of 2)
...
too many plugins.. brain exploding..
2008-08-03 16:40:12 -04:00
Joey Hess
9e0cbb73fe
plugin safe/rebuild controls
2008-08-03 16:23:41 -04:00
Joey Hess
4405cebd0a
add advanced and basic modes
2008-08-03 14:57:24 -04:00
Joey Hess
5c0f539950
avoid adding extra disabled fields for arrays
2008-08-03 14:41:53 -04:00
Joey Hess
d00f3edf13
properly support all types of data in arrays
2008-08-03 14:39:34 -04:00
Joey Hess
0f06504422
remove description_html, add link
2008-08-03 14:36:17 -04:00
Joey Hess
5ef45ca7e1
support arrays
2008-08-03 00:27:27 -04:00
Joey Hess
d8b49840dd
update
2008-08-02 23:59:40 -04:00
Joey Hess
7baa6320e0
rebuild detection
2008-08-02 23:32:40 -04:00
Joey Hess
8c02d670d0
pull values from form to config
2008-08-02 23:14:59 -04:00
Joey Hess
f6babf662b
fix syntax error with corrupt data
...
Just because it's supposed to be an integer or boolean doesn't mean the
vlaue really is..
2008-08-02 23:14:23 -04:00
Joey Hess
94c59d3254
collect a hash of shown fields
...
Need to do this to know what fields to take from CGI.
(Can't trust that only safe ones are sent..)
2008-08-02 23:06:25 -04:00
Joey Hess
c762b65ce4
show unsafe options (RO) by default
...
Small data leak, but only to admins, and I think it's worth it to see the
stuff that cannot be configured.
2008-08-02 22:50:09 -04:00
Joey Hess
5dbd053da3
avoid syslog whining from broken plugins
2008-08-02 22:22:53 -04:00
Joey Hess
6f65cb1cbe
avoid setting default value in websetup_force_plugins
...
This would make changes not be seen later.
2008-08-02 22:20:26 -04:00
Joey Hess
15341aed01
don't install demo external plugins by default
2008-08-02 16:53:20 -04:00
Joey Hess
4708aeceb3
websetup form display done
2008-08-02 16:41:37 -04:00
Joey Hess
b0f4767448
basic form display done
2008-08-02 16:41:36 -04:00
Joey Hess
102f29e500
add description_html
2008-08-02 16:41:36 -04:00
Joey Hess
0b6dd9247b
refactor
2008-08-02 16:41:35 -04:00
Joey Hess
d3cad5d2ca
relocate
2008-08-02 16:41:35 -04:00
Joey Hess
680cd2fbc3
skeleton of web setup plugin
2008-08-02 16:41:35 -04:00
Joey Hess
25c35b6e90
banned_users move to setup file, stage 1
2008-08-01 17:39:17 -04:00
Joey Hess
190a845fe1
hide deprecated values if empty after save
2008-08-01 17:39:17 -04:00
Joey Hess
f41448d9ca
rcs plugin loading reorg
...
Move rcs plugin load to loadplugins; move duplicate rcs detection logic out
of individual plugins and into loadplugins. Avoids checkconfig failing when
run twice.
2008-08-01 16:45:05 -04:00
Joey Hess
bb394fdae8
admin prefs move to setup file, stage 1
...
The locked pages configuration is moving to a locked_pages option in the
setup file, and the allowed attachments configuration to
allowed_attachments. The admin prefs page can still be used for these, but
that's depreacted and will only be shown if there's currently a value.
2008-08-01 16:45:04 -04:00
Joey Hess
041923a89e
Merge branch 'master' into autoconfig
...
Conflicts:
IkiWiki/Plugin/git.pm
debian/changelog
po/ikiwiki.pot
2008-07-31 19:35:37 -04:00
Joey Hess
f7b8f2297c
Add test for old versions of git that don't support --cleanup=verbatim, and munge empty commit messages.
2008-07-31 19:23:54 -04:00
Joey Hess
6c8a8dd13b
add guard against enabling multiple rcs plugins
2008-07-30 14:32:48 -04:00
Joey Hess
12c5786df4
Merge branch 'tova' into autoconfig
...
Conflicts:
debian/changelog
2008-07-29 15:54:45 -04:00
Joey Hess
f0090d8c57
check generated pages in
...
I considered not checking them in, or making the checkin configurable.
However, then they would remain not checked in if edited by a user, which is
probably not desired.
Note that passing undef as the username/ip to rcs_commit_staged may not
result in ideal behavior; the commit may seem to come from "anonymous" with
some revision control systems. Most of them handle it a bit better and just
have it come from whatever user is running the build.
2008-07-29 15:51:25 -04:00
Joey Hess
a02c3f46ea
initial draft
2008-07-29 15:39:01 -04:00
Joey Hess
37245a9988
add refresh hook
2008-07-29 15:04:34 -04:00
Joey Hess
73af360e99
fix cgiurl check
2008-07-27 19:21:56 -04:00
Joey Hess
9be28d7865
handle options with no value and no example value
2008-07-27 19:19:04 -04:00
Joey Hess
9607452346
typo
2008-07-27 16:11:06 -04:00
Joey Hess
950850f639
add new wiki to wikilist
2008-07-27 16:01:29 -04:00
Joey Hess
929a70a16d
password prompt for admin user
2008-07-27 15:44:11 -04:00
Joey Hess
c755bfd1d8
automator improvements
2008-07-27 15:16:03 -04:00
Joey Hess
3d4c32dace
lose the ugly $rawsetup, use a function
2008-07-27 15:08:10 -04:00
Joey Hess
3d139e4312
rcs hook setup for the two I know
2008-07-27 01:50:43 -04:00
Joey Hess
f28b57526c
setup automator
...
"ikiwiki -setup /etc/ikiwiki/simple.setup"
can be used set up a new wiki in seconds
2008-07-27 01:39:11 -04:00
Joey Hess
e1f7146041
avoid clobbering example diffurl
2008-07-27 00:54:15 -04:00
Joey Hess
4ef96e2d99
Merge branch 'master' into autoconfig
2008-07-26 23:22:42 -04:00
Joey Hess
618e3c1075
use new style error handling
2008-07-26 23:15:35 -04:00
Enrico Zini
e3713772f7
Added cutpaste plugin.
...
I'm wondering if cutandpaste wouldn't be a better name.
2008-07-26 23:08:17 -04:00
Enrico Zini
02078c406c
Handle the case when HTML got tidied.
...
This fixes debian bug #492529 .
2008-07-26 23:05:57 -04:00
Joey Hess
6a64d13352
allow --dumpsetup to be used w/o specifying srcdir and destdir
...
shortcut tried to use srcdir in checkconfig; change it to not so this will
work.
2008-07-26 23:00:44 -04:00
Joey Hess
67a63e7860
fixups
2008-07-26 22:38:43 -04:00
Joey Hess
6154dd03cb
finish with rcs plugin conversion
2008-07-26 22:28:18 -04:00
Joey Hess
14cd75746a
Version control backends promoted to first-class plugins
2008-07-26 22:27:24 -04:00
Joey Hess
82f0facb62
fixups
2008-07-26 21:14:07 -04:00
Joey Hess
42ac4ec009
remove default values in getsetup
...
They were a bit confusing, since they did not actually set the default, and
example values are sufficient.
2008-07-26 21:07:15 -04:00
Joey Hess
c83fd4a328
wrapper setup reorg
...
Flattened the wrapper setup, as this lets it be handled better by the
setup generation code.
2008-07-26 21:00:11 -04:00
Joey Hess
38618838c9
add example wrapper and fix formatting
2008-07-26 19:49:45 -04:00
Joey Hess
cecd3bf725
historyurl can be undef
2008-07-26 19:37:25 -04:00
Joey Hess
8051316904
add missing setup options, tweak others' display
2008-07-26 19:28:15 -04:00
Joey Hess
bb872ea1e8
filter out demo plugins
2008-07-26 19:11:31 -04:00
Joey Hess
52bbdbb1a5
load all plugins when generating setup
2008-07-26 19:10:11 -04:00
Joey Hess
f892cc8c50
two typos
2008-07-26 19:05:52 -04:00
Joey Hess
477654003f
clarify wording
2008-07-26 18:33:18 -04:00
Joey Hess
56b9b85e33
tla done too
2008-07-26 18:31:27 -04:00
Joey Hess
2bbe1bf9af
move more settings out to rcs
2008-07-26 18:29:33 -04:00
Joey Hess
90b310b93c
getsetup-ize svn and bzr
2008-07-26 18:26:56 -04:00
Joey Hess
21af3ae336
add folding
2008-07-26 18:14:21 -04:00
Joey Hess
b277e00d4e
add gensetup for hg
2008-07-26 18:13:16 -04:00
Joey Hess
66739016fa
add gensetup for git
2008-07-26 18:10:01 -04:00
Joey Hess
9bcb649efe
typos
2008-07-26 17:58:20 -04:00
Joey Hess
0e0ee9b2ce
make monotone use hooks, add getsetup
...
Rather than every monotone rcs_ function calling check_config, just put it
in a checkconfig hook. (But the chdir still needs to be done by every
hook.)
2008-07-26 17:49:25 -04:00
Joey Hess
cab1ac75c9
refactor
2008-07-26 15:43:25 -04:00
Joey Hess
b073359b18
refactor
2008-07-26 15:39:41 -04:00
Joey Hess
1c00717cb2
can now dump fully functional setup files
2008-07-26 15:34:38 -04:00
Joey Hess
cd029da493
typo
2008-07-26 14:56:10 -04:00
Joey Hess
26db34e1d6
adminemail may be undefined
2008-07-26 14:54:50 -04:00
Joey Hess
79f637a436
typo
2008-07-26 14:44:49 -04:00
Joey Hess
49e86d2562
turn booleans into questions
2008-07-26 14:43:47 -04:00
Joey Hess
abab46f983
add info for all common setup file options, and most internal ones
2008-07-26 14:39:12 -04:00
Joey Hess
1ba84c3a6b
predefine pingurl
2008-07-26 14:38:58 -04:00
Joey Hess
c2507d33cb
allow account_creation_password to not be defined
2008-07-26 14:02:36 -04:00
Joey Hess
6b19afb3ef
fixes
2008-07-26 13:10:52 -04:00
Joey Hess
9169c3247f
standardising and documenting getsetup
2008-07-26 13:07:48 -04:00
Joey Hess
255172215e
fixes
2008-07-26 12:53:07 -04:00
Joey Hess
5bea644fdd
add dumpsetup option; refactor
2008-07-26 12:46:31 -04:00
Joey Hess
62cd2e0a5d
setup dumping improvements
2008-07-26 12:01:10 -04:00
Joey Hess
e727d5b6e9
more formatting
2008-07-26 02:04:30 -04:00
Joey Hess
fe2fe5aa4b
improve formatting
2008-07-26 01:58:36 -04:00
Joey Hess
278ae9afea
add ability to generate setup files
...
quite nice ones, too, with comments and everything
2008-07-26 01:35:26 -04:00
Joey Hess
0d7bc7402c
fix plugin name
2008-07-26 00:45:32 -04:00
Joey Hess
426200b34a
avoid fatal error in sanitize
2008-07-26 00:45:21 -04:00
Joey Hess
84c905ec20
finish adding getsetup hooks to plugins
2008-07-26 00:38:13 -04:00
Joey Hess
d0bd30824e
Merge branch 'master' into autoconfig
2008-07-25 19:27:15 -04:00
Joey Hess
b7bf566f55
attachment: Use relative paths when inserting links.
2008-07-25 19:22:29 -04:00
Joey Hess
1f8b0460c3
added getsetup hooks for all plugins up to recentchanges
2008-07-25 18:05:55 -04:00
Joey Hess
cf6c2f142f
add getsetup
...
Also, avoid dying with a fatal error if multimarkdown is enabled and the
module doesh't load.
2008-07-25 17:52:00 -04:00
Joey Hess
bf6198baf3
add getconfig for inline
...
Also, moved the pingurl getopt parsing to inline.
2008-07-25 17:24:52 -04:00
Joey Hess
a71b9a1cf1
fix feed urls
...
The fix for colons involved adding "./" to some urls. Due to the weird way
inline called urlto, these snuck into feed urls and permalinks. Fix it by
adding an optional third parameter to urlto.
2008-07-25 16:16:44 -04:00
Jelmer Vernooij
3575798564
bzr: Version directories on the fly, ignore directories when retrieving
...
changes.
Now passes t/bazaar.t again.
2008-07-25 20:13:45 +02:00
Joey Hess
c401cf4f0c
Merge commit 'jelmer/master'
2008-07-25 12:03:34 -04:00
Joey Hess
89e0de5bc4
improved, possibly faster getelementsbyclass by willu
2008-07-25 01:43:37 -04:00
Joey Hess
99b59f2d62
toggle: Fix incompatability between javascript and webkit.
2008-07-25 01:24:20 -04:00
Jelmer Vernooij
7538d356c8
Support staging commands in bzr backend.
2008-07-24 22:43:57 +02:00
Joey Hess
58e2b2c99c
mercurial: Add support for rename, delete, and also diff. (William Uther)
2008-07-24 14:17:04 -04:00
Joey Hess
c2f621cb1c
fix encoding issues with link conversion
...
Have to convert link text to page name going in.
And on the way out, need to replace spaces with underscores in the link
text, which is not normally done with titles.
2008-07-24 12:36:10 -04:00
Joey Hess
8b3d2ab0bc
test suite and partial fix for encoding issues in link renaming
2008-07-23 21:04:11 -04:00
Joey Hess
c9961ab1e9
add todo
2008-07-23 19:38:09 -04:00
Joey Hess
762bf0b887
foldage
2008-07-23 19:25:46 -04:00
Joey Hess
985a34b09e
fixup editpage links on rename
2008-07-23 19:20:11 -04:00
Joey Hess
7befc6deb3
link fixup on rename working
2008-07-23 19:12:05 -04:00
Joey Hess
4918c164e8
preserve case of subpage
2008-07-23 19:03:37 -04:00
Joey Hess
8b063a24d9
case preservation
2008-07-23 18:57:27 -04:00
Joey Hess
4691a2ad39
add renamepage hooks
...
Implemented for regular wikilinks, with a test suite.
2008-07-23 18:14:20 -04:00
Joey Hess
96dab37a8e
Merge branch 'master' into tova
2008-07-23 17:34:01 -04:00
Gabriel McManus
d9062864ee
Rebuild pages that change their type.
...
Previously, if a page changed its type but not its mtime
(e.g. mv page.txt page.mdwn), then it would not be rebuilt.
Now, check if the source of a page has changed,
in which case force a rebuild of that page.
(cherry picked from commit b6a3b8a683fed7a7f6d77a5b3f2dfbd14c849843)
2008-07-23 16:00:26 -04:00
Joey Hess
335a6a59e6
Merge branch 'master' into tova
2008-07-23 15:00:07 -04:00
Joey Hess
1d1767192c
attachment: Do not escape _ when determining attachment filenames.
2008-07-23 14:58:39 -04:00
Joey Hess
29f32d0ba3
add a list of broken links after the rename
2008-07-22 20:30:54 -04:00
Joey Hess
1c9a3cb82b
add a rename summary
2008-07-22 20:17:03 -04:00
Joey Hess
d76c10cba2
Split out error messages from editpage.tmpl into several separate templates.
2008-07-22 19:58:34 -04:00
Joey Hess
2b9615194e
fix gettext
2008-07-22 19:44:31 -04:00
Joey Hess
421559b230
edit page fixup in postrename
2008-07-22 18:17:11 -04:00
Joey Hess
89b3bb7e38
check for absolute paths
2008-07-22 17:38:31 -04:00
Joey Hess
9776bbf853
Don't allow uploading an attachment with the same name as an existing page, to avoid confusion.
2008-07-22 17:12:20 -04:00
Joey Hess
114e20e948
typo
2008-07-22 17:03:28 -04:00
Joey Hess
cbddb5a4b8
add rcs_commit_staged and rcs_rename
...
Implemented for git and svn so far.
Note that rcs_commit_staged does assume that the rcs has the ability to
"stage" multiple changes for a later commit. Support for this varies, but
all we really care about is staging removals and renames, which, AFAIK, all
modern rcs's support.
2008-07-22 16:14:33 -04:00
Joey Hess
cf9620074a
qualifiy
2008-07-22 15:07:07 -04:00
Joey Hess
bac47cdecd
make message a bit more generic
2008-07-22 15:06:59 -04:00
Joey Hess
cbf1c8b810
rename checks improvements
2008-07-22 14:01:23 -04:00
Joey Hess
569d31d875
permission checking improvements
...
Break out into function so it can be done up-front before confirmation too.
2008-07-22 13:29:54 -04:00
Joey Hess
ac1226031e
avoid uninitialised value
2008-07-22 13:23:11 -04:00
Joey Hess
a3e16cd29f
really add
2008-07-21 22:44:37 -04:00
Joey Hess
0c9fe2f99c
use check_canattach
...
As noted, this may be overkill..
2008-07-21 22:44:19 -04:00
Joey Hess
f9cbe871ad
factor out check_canattach
...
Other plugins will need to use this.
2008-07-21 22:41:31 -04:00
Joey Hess
96c529826d
skeleton rename plugin
2008-07-21 22:30:43 -04:00
Joey Hess
ed05e40566
error if nothing selected
2008-07-21 22:11:24 -04:00
Joey Hess
6e243a45e5
probably redundant symlink check
2008-07-21 21:57:58 -04:00
Joey Hess
9d5c9ce258
Merge branch 'master' into tova
2008-07-21 21:23:58 -04:00
Joey Hess
c2a2f71508
Add allow_symlinks_before_srcdir config setting
...
can be used to avoid a security check that is a good safe default, but
problimatic overkill in some situations.
I decided to underdocument this, because the option looks ugly, and I don't
want people randomly turning it on because it looks like a good idea. So if
you need it, you'll get an error message mentioning how to fix it.
2008-07-21 18:33:09 -04:00
Joey Hess
e630e7507e
Avoid troublesome abs_path calls in wrapper setup
...
As documented in the forum post.
2008-07-21 18:26:14 -04:00
Joey Hess
18d2403647
Merge branch 'master' into tova
...
Conflicts:
debian/changelog
2008-07-21 17:27:50 -04:00
Simon McVittie
09a5cdbb34
Don't prepend tagbase to tags if they start with "./" or "/".
...
That syntax made little sense previously, and this allows sites to put
"most" of their tags under $tagbase.
2008-07-21 22:02:55 +01:00
Joey Hess
97e21ae21c
don't show an error if the image is missing, instead, a broken link
2008-07-21 16:53:52 -04:00
Joey Hess
7910f1c352
remove debugging
2008-07-21 16:53:46 -04:00
Joey Hess
d724a26754
avoid internal error message when img uses just-deleted page
...
I think this used to be a fatal error, not just inline error, so I don't
know why it was never noticed, but if a page that an img directive mentions
gets deleted, bestlink() returns a file that no longer exists, and
srcfile() throws an error.
Note that bestlink's behavior of returning a deleted file could be
considered buggy. But, if it's changed to not do that, the page with the img
on it is not updated at all when the file is removed.
2008-07-21 16:38:40 -04:00
Joey Hess
d9af10a1be
typos
2008-07-21 16:21:59 -04:00
Joey Hess
90de84b442
typos
2008-07-21 16:21:46 -04:00
Joey Hess
b182f5e573
need to untaint..
2008-07-21 16:20:02 -04:00
Joey Hess
2461ce0de6
a few bugfixes
...
Including a check the the file is in the srcdir, as opposed to some other
directory.
2008-07-21 16:18:28 -04:00
Joey Hess
af9c5e4bba
support for removing attachments
2008-07-21 15:02:29 -04:00
Joey Hess
a1df39ed4a
simplified confirmation form
...
also, there's no titlepage conversion issues
2008-07-21 14:22:57 -04:00
Joey Hess
b1b5860b29
touchups
2008-07-21 14:03:39 -04:00
Joey Hess
494e7ab8ba
redirect after removal
2008-07-21 13:53:34 -04:00
Joey Hess
c924c76bd8
basically, removal works
...
Still need to consider all the edge cases..
2008-07-21 13:50:12 -04:00
Joey Hess
c6d1ae33d2
All rcs backends need to implement rcs_remove
...
(Done for svn, git.)
2008-07-21 13:41:17 -04:00
Joey Hess
a204f86786
form tweaks; use title
2008-07-21 13:31:58 -04:00
Joey Hess
b286ce04cb
implemented form state saving and retrieval
...
This is overkill for delete, since it's only used on Cancel. But it will be
crucial for rename, so as to restore any pending edits after renaming a
page.
2008-07-21 13:23:07 -04:00
Joey Hess
8e7b31a19c
basic removal form skeleton
2008-07-21 12:54:23 -04:00
Joey Hess
46617c23f4
rename skeleton.pm
...
Add '.example' so it's not installed with the other plugins.
2008-07-21 07:49:28 -04:00
Gabriel McManus
e3b0584a49
Use correct term prefixes when searching.
...
The Z term prefix is for stemming and shouldn't be used here.
X is for custom fields.
2008-07-19 13:23:02 -04:00
Joey Hess
2c9ab7065e
mark old web commits as from web
2008-07-17 19:25:10 -04:00
Joey Hess
e8a11957df
fix web commit determination
2008-07-17 19:23:00 -04:00
Joey Hess
afd3126e55
dummy up an email address for web commits
...
Not doing so breaks cia and other things that try to parse a username out
of the email address.
2008-07-17 19:12:34 -04:00
Joey Hess
1b318dacbd
git: Fix parsing of git logs with no commit messages at all.
2008-07-17 16:53:54 -04:00
Joey Hess
f66eddccc6
change how web commits are specified
...
The trailer line was a bit complex and ugly;
I think it's better to just put "(web)" after the user
name.
This has a side effect of making web commits with no messages
have a completly empty commit message. Use --cleanup=verbatim
to force git to accept such.
2008-07-17 16:35:18 -04:00
Joey Hess
ac62a47ea4
git: Put web committer name/openid/address in the git author field
...
The committer's email address is not used (because leaking email addresses
is not liked by many users). Closes : #451023
A "Web-commit" trailer is added, to allow telling the difference between
web commits and direct commits.
2008-07-17 16:17:15 -04:00
Joey Hess
584f3e3061
Add a postscan hook.
...
* Add a postscan hook.
* search: Use postscan hook, avoid updating index when previewing.
2008-07-17 16:17:15 -04:00
Joey Hess
c4f124d78a
fix pos setting
...
What was really going on is that expanding a smiley modified the string and
reset the match process. Force set pos so it continues on from the expanded
smiley.
2008-07-17 13:11:47 -04:00
Joey Hess
df3a8b183c
smiley escaping fixes
...
Smileys need to be double-escaped to work, since the smiley plugin runs as
a sanitize hook, and markdown helpfully removes one level of escapes first.
There were some bugs in the smiley handling code that made escaped smileys
still be expanded. After unescaping a smiley, it needed to move pos forward
past it or the next pass would expand it.
Also, once the m//g got to the end, it seemed to loop back through and make
one more pass (a difference in perl 5.10's regexp exngine? I observed that
pos was undefined when this happened, so added a `last unless defined pos`.
2008-07-17 12:34:38 -04:00
Joey Hess
3096c8ea69
formatting etc
2008-07-16 17:43:42 -04:00
Joey Hess
2c05a34be1
Merge commit 'intrigeri/pedigree'
2008-07-16 17:31:15 -04:00
intrigeri
35668b87d3
pedigree rename to parentlinks: rename/adapt everything
...
* Renamed to parentlinks every single variable or function called
pedigree
* Removed the parentlinks function from Render.pm
* Enabled the new parentlinks plugin by default
* Adapted testsuite and documentation to reflate the above facts
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-15 16:25:39 +02:00
intrigeri
486f460132
pedigree rename to parentlinks: renamed files, to start with
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-15 16:09:40 +02:00
intrigeri
55000fd779
pedigree: rewrote with different design
...
(and updated testsuite + docs accordingly)
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-15 13:06:52 +02:00
Joey Hess
2696e0c6db
fixes
2008-07-14 23:00:29 -04:00
Joey Hess
76bda69a92
use prune to delete rendered files
...
This handles deleting empty directories too.
2008-07-14 22:45:12 -04:00
Simon McVittie
b29d11b3c6
Fix aggregateinternal migration so it skips expired entries, and deletes output
2008-07-15 03:24:05 +01:00
Joey Hess
af48316b1d
Merge commit 'smcv/aggregateinternal' into aggregateinternal
...
Conflicts:
IkiWiki/Plugin/aggregate.pm
2008-07-14 20:15:08 -04:00
Simon McVittie
302bb836f2
Use _aggregated as extension for internalized aggregation
2008-07-15 01:04:29 +01:00
Joey Hess
51bf0ea529
changes to debug message printing
2008-07-14 19:43:45 -04:00
Simon McVittie
50a5ab3c4e
Add aggregateinternal mode to ikiwiki-transition.
...
Usage:
1. Update all pagespecs that use aggregated pages to use internal()
2. ikiwiki-transition aggregateinternal $srcdir $htmlext
(where $srcdir and $htmlext are the srcdir and htmlext options in
your .setup file)
3. Add aggregateinternal to your .setup file
4. Rebuild the wiki
2008-07-14 23:39:22 +01:00
Simon McVittie
18b3e970ff
Merge commit 'origin/master' into aggregateinternal
2008-07-14 23:34:07 +01:00
intrigeri
b391b5a80b
pedigree: added DISTANCE loop variable
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-14 14:52:34 +02:00
intrigeri
b857b229d8
pedigree: fix RELDEPTH in PEDIGREE_BUT_ROOT...
...
... at least when it's not used in the same template as
PEDIGREE_BUT_TWO_OLDEST (see Known bugs section in pedigree.mdwn for
details)
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-14 14:25:42 +02:00
intrigeri
df42a5ef21
pedigree: added _but_root & _but_two_oldest loops
...
... after having learned a bit of Perl, knocked my head against
Perl references and arrays of hashes, tried to use some nice
functionnal programming constructs - no success - to make things
more generic... I'm back to the roots, with this simple code :)
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-13 22:03:22 +02:00
intrigeri
16cf69477d
pedigree: fixed misc bugs
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-13 22:03:06 +02:00
intrigeri
f32369f669
added new plugin: pedigree
...
Signed-off-by: intrigeri <intrigeri@boum.org>
2008-07-13 22:02:23 +02:00
Joey Hess
ffc99f5904
switch preprocess hooks to use error function
2008-07-13 15:05:34 -04:00
Joey Hess
0b140ed1c8
avoid hardlinking files owned by others
...
If hardlinks are enabled, it would hardlink files from the underlay. That
was sorta annoying if you tried to edit by hand for some reason, so let's
not. Files that are hardlinked should be rare enough that a few extra stats
won't hurt.
2008-07-12 23:31:27 -04:00
Joey Hess
e3c0e49774
only htmlize errors when cgi is actually running
2008-07-12 23:23:25 -04:00
Joey Hess
e4e3d7e2d4
convert fatal error to warning
...
Since perlmagick is not a hard dep, and goodstuff is enabled by default,
imgs should not crash builds
2008-07-12 20:21:42 -04:00
Simon McVittie
bed1f1037a
Add missing requirement of IkiWiki::render before starting to render things
2008-07-12 22:52:46 +01:00
Simon McVittie
5c0896e674
Make aggregated items be internal pages if --aggregateinternal is used.
...
This addresses <http://ikiwiki.info/todo/aggregate_to_internal_pages/ >
in a simple way. With this approach, a flag day is required, on which all
users of aggregated pages start to inline them using the internal() pagespec;
after that, the aggregateinternal option can safely be switched on in the
setup file (and the old aggregated pages can be deleted by hand).
2008-07-12 18:15:11 +01:00
Simon McVittie
9a184badf5
Stop prepending urn:uuid: to guids that look like UUIDs
2008-07-12 17:34:40 +01:00
Simon McVittie
415c8e0cb5
Rename [[!inline atomid="..."]] to [[!inline guid="..."]] to be consistent with [[!meta guid="..."]], which also outputs an Atom <id>
2008-07-12 17:12:37 +01:00
Simon McVittie
2bd8ada5a6
Accept [[!inline ... atomid="..."]] and use it to populate the feed's Atom <id>.
...
This is often the same as the feed's <link> (in which case it can be omitted) but sometimes it's a urn:uuid: URN instead.
2008-07-12 17:09:41 +01:00
Joey Hess
f707d62481
Merge commit 'smcv/master'
2008-07-12 12:02:57 -04:00
Joey Hess
d101269bde
Move yesno function out of inline and into IkiWiki core, not exported.
2008-07-12 12:01:22 -04:00
Simon McVittie
1f26a1bf16
Bug fix: use &IkiWiki::pagetitle rather than nonexistent &pagetitle in meta plugin, so that PageSpecs with title(...) work again
2008-07-12 16:44:55 +01:00
Joey Hess
ca30d95a78
rename uuid to guid
2008-07-12 10:59:45 -04:00
Joey Hess
37471e92d9
elide temp var
2008-07-12 10:49:12 -04:00
Simon McVittie
9c6444bf68
meta plugin: if uuid looks like it is in fact a UUID, prepend "urn:uuid" (otherwise leave it alone, so we can assign non-UUID <id>s to Atom items to avoid planet-flooding)
2008-07-11 23:57:47 +01:00
Simon McVittie
e767f18867
inline plugin: if meta plugin is also enabled, and has collected a uuid for a page, then pass it into the rssitem/atomitem templates
2008-07-11 23:44:12 +01:00
Simon McVittie
9b34b879e2
meta plugin: also collect [[!meta uuid="..."]]
2008-07-11 23:42:38 +01:00
Joey Hess
d73d4fed03
rename beautify_url to stress it only works on the path component
2008-07-11 10:33:41 -04:00
Joey Hess
d5de560f50
beautify url recentchanges_link redirs to
...
This ensures that the same link is reached as is used on pages,
so browsers will know that the link on pages has been visited, and color it
appropriately.
2008-07-11 09:44:47 -04:00
Joey Hess
4e1d7d8ff2
fix use ordering
...
The recent setup revamp exposed some latent bugs in use/package ordering
that caused some symbols to not the exported into the correct scope.
2008-07-11 06:09:34 -04:00
Joey Hess
598a8ce1f7
whitespace
2008-07-11 06:09:34 -04:00
Joey Hess
3879c56e71
Fixes creation of pages when clicking on WikiLinks starting with "/".
2008-07-10 15:36:18 -04:00
Joey Hess
dcab5e2e48
template: Add support for a BASENAME variable.
2008-07-10 15:25:42 -04:00
Joey Hess
5d26ded381
work around CGI::Session constructor issues
...
The constructor can fail with a useless error message if module fail to
load. Work around this by evaling it, and checking for failures, and
printing CGI::Session->errstr to get a more useful message.
2008-07-10 13:17:56 -04:00
Joey Hess
aa1f0080a8
clarifications, comments
2008-07-09 22:47:06 -04:00
Joey Hess
4e02dead14
Make it possible to load setup files w/o running them. Code needing to do so can call IkiWiki::Setup::load, and the values will be loaded into %IkiWiki::Setup::setup.
2008-07-09 22:39:26 -04:00
Joey Hess
06709cdf31
improve error message if virus checker fails w/o output
2008-07-09 16:53:03 -04:00
Joey Hess
2449c596af
otl: Support utf-8 files. (Recai Oktaş)
2008-07-08 20:52:30 -04:00
Joey Hess
ad02f69836
attachment: Support perl 5.8's buggy version of CGI.pm.
...
This is truely horribly disgusting. CGI::tmpFileName, in current perls, is
an undocumented function (which should be a clue..) that takes the original
filename of an uploaded attachment, and returns the name of the tempfile
that CGI has stored it in.
In old perls, though, CGI::tmpFileName does not take a filename. It takes
a key from the object's {'.tmpfiles'} hash. This key is something
crazy like '*Fh::fh00001group' -- apparently the stringification of a
filehandle object.
Just to add to the fun, tmpFileName doesn't take the key, it expects a
refernce to the key. Argh?!
But the fun doesn't stop there, because in perl 5.8, CGI.pm is also broken
in two other ways. The upload() method is supposed to return a filehandle
to the temp file. It doesn't. The param() method is supposed to return
a filehandle to the temp file, that stringifies to the original filename.
It returns just the original filename, no filehandle.
Combine all these bugs, and you end up with this disgusting commit. Since
I have no way to get the filehandle, I *need* to get the tempfile name.
If I had the filehandle, I could probably pass it into tmpFileName, and
it might strigify to the right key name. But I don't, so the only way to
determine the key is to grub through the .tmpfiles hash ourselves.
And finally, one the temp file name is discovered, a filehandle can finally
be obtained by (re)opening it.
I recommend that this commit be reverted when perl 5.8 is a mercifully
faded memory.
I'm really, really, really glad I'm actually being paid for working on
this right now!
2008-07-08 18:10:53 -04:00
Joey Hess
2e5785907d
explicitly set form type to multipart
...
This is the default in unstable's formbuilder, but not in stable's,
and CGI multipart is needed for fule uploads.
2008-07-08 17:18:02 -04:00
Joey Hess
22839215fb
check for tempfile being empty
2008-07-08 16:21:01 -04:00
Joey Hess
6f3c980e2b
undef $fh before opening
2008-07-08 12:16:36 -04:00
Joey Hess
66f35e30dc
another try at dealing with CGI.pm problem
...
open the temp file if all attempts to get a fd fail
2008-07-08 11:25:30 -04:00
Joey Hess
71f10579c0
attachment: Support old versions of CGI.pm that lack an upload method.
2008-07-08 10:42:58 -04:00
Joey Hess
f156308aef
attachment: Fix an uninitialised value warning when editing a page that currently has no attachments.
2008-07-08 09:40:46 -04:00
Joey Hess
dbbc1e4040
minor improvements
2008-07-07 01:54:28 -04:00