Age | Commit message (Collapse) | Author |
|
It can now be configured with the po_strictly_refresh_backlinks setting.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
... that was removed in 68869d664b978b063c9181d024edb34a63306c33
Without this scalar, a two-cells array is passed to $template->param, which
builds a hash with an odd number of elements.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
After some thinking about it, I can't find why the type of a page being created
in the CGI could be restricted to po. So the previous case seems enough.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
use is file-scoped so warnings and strict are already enabled
inside the second package, and IkiWiki is already loaded
(though not imported into this context)
|
|
|
|
|
|
|
|
|
|
scalar(undef) is undef, so using scalar here had no effect.
Instead make the function return "", probably avoiding an uninitialized
value warning.
|
|
if (scalar @array) is written idiomatically in perl as
if (@array).
|
|
I'm still not happy with the clarity of this warning message.
I don't understand when it could happen or why a warning is needed.
|
|
I prefer to use either of the other two syntaxes perl offers, and not this
one.
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
too old po4a
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
All meta titles are first extracted at scan time, i.e. before we turn
PO files back into translated markdown; escaping of double-quotes in
PO files breaks the meta plugin's parsing enough to save ugly titles
to %pagestate at this time.
Then, at render time, every page's passes on row through the Great
Rendering Chain (filter->preprocess->linkify->htmlize), and the meta
plugin's preprocess hook is this time in a position to correctly
extract the titles from slave pages.
This is, unfortunately, too late: if the page A, linking to the page B,
is rendered before B, it will display the wrongly-extracted meta title
as the link text to B.
On the one hand, such a corner case only happens on rebuild: on
refresh, every rendered page is fixed to contain correct meta titles.
On the other hand, it can take some time to get every page fixed.
We therefore re-render every rendered page after a rebuild to fix them
at once. As this more or less doubles the time needed to rebuild the
wiki, we do so only when really needed.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Fixes build break due to read-only underlay dirs, e.g. basewiki.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
... by overriding cgiurl.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
... explaining how to go on with edit.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Form validation works, but after trying to save invalid PO content, the user is
brought back to the page he/she was editing, without any single clue to explain
why it was not saved. The dedicated cansave hook is thus necessary.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
This has to be done after the rename/remove plugins have added
their buttons, so we set this hook to be run last.
The canrename/canremove hooks already ensure this is forbidden
at the backend level, so this is only UI sugar.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
The main reason to do so is to bypass the "favor the type of linking page on
page creation" logic, which is unsuitable when a broken link is clicked on
a slave (PO) page.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
... because Po4a's parser does not care about malformed PO data.
Use gettext's msgfmt program instead.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Allow this new po_to_markup function to run in non-fatal mode,
we need this in our cansave hook.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
This is not needed by the use I'm doing of it, but seems more consistent to me.
Future users of this hook may need this data to make their mind.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
)
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
... so that nicepagetitle hook's effects, such as translation status displayed
in links, are updated when the linked page changes.
The replacement of 'my %backlinks' with 'our %backlinks' in Render.pm made this
work: previously, every postscan hook was called with an almost empty
%backlinks, which defeated all my attempts to implement this feature.
This feature hits performance a bit. Its cost was quite small in my real-world
use-cases (a few percents bigger refresh time), but could be bigger in worst
cases. Time will tell.
NB: this hack could also be used by my meta branch. It may even be a ikiwiki
optional feature.
Signed-off-by: intrigeri <intrigeri@boum.org>
|
|
... to make configurable the last implemented feature.
Signed-off-by: intrigeri <intrigeri@boum.org>
|