Commit Graph

2455 Commits (75f762014bbb2bef19b443e2f6617692efdbda87)

Author SHA1 Message Date
Joey Hess 38ff2b44c6 Fix a snail mail address. Closes: #659158 2012-02-08 16:07:20 -04:00
Amitai Schlair 9faa0f3c65 Merge branch 'master' into cvs 2012-02-07 02:47:24 -05:00
Joey Hess 1b6c189578 fix display of page name in recentchanges after a revert
When the wiki is in a subdir of the git repo, a web revert would show
in recentchanges as eg, doc/index, instead of just index.

This happened because decode_git_file caches a $prefix that is dependant
on the $git_dir setting, and the revert code runs with a different
$git_dir, which polluted the $prefix for later.

Fix this by adding a with_git_dir that juggles the variables properly.
2012-02-07 03:06:40 -04:00
Amitai Schlair e45175d545 More testings and fixings:
* Test that adding a text file under a name formerly tracked as
  binary (and vice versa) gets the right keyword-substitution
  behavior.
* Explicitly set -kkv for text files to make the tests pass.
* CVS warns in these cases about "changing keyword expansion mode",
  but this is correct behavior, so filter it from stderr. Filter
  stdout the same way in case we ever want to keep any of it.
* In rcs_add(), replace comments with obviousness.
2012-02-05 16:33:49 -05:00
Amitai Schlair 6753235d98 Write rcs_diff() tests according to the API spec, then make them pass. 2012-02-05 01:20:52 -05:00
Joey Hess c3f9ef8289 revert change to prettydate
Its strftime is from Date::Format, doesn't have the problem, and using the
POSIX one breaks its %o.
2012-02-02 22:27:55 -04:00
Joey Hess a78126c55e calendar, prettydate: Fix strftime encoding bug
strftime is a C function, it does not return decoded utf8.
Several places in ikiwiki manually decoded it, but at least two
forgot to.

Also, strftime might not return even encoded utf8, if LC_TIME is set
to a non-utf8 value. Went ahead and supported decoding whatever encoding
it uses.

The remaining direct calls to strftime() are all ones that first set
LC_TIME=C, in order to get times that are not for human display.
2012-01-30 15:09:37 -04:00
Amitai Schlair d6b7654fcf Move cvs_keyword_subst_args() down with the other internal support routines. 2012-01-26 17:08:12 -05:00
Amitai Schlair ac8eab29e8 Uncomment the CVS keyword substitution mode tests, and make them pass:
Extract cvs_keyword_subst_args() and ensure it runs in $config{srcdir}.
Using Perl's -T operator appears to work equally well, perhaps switch?
2012-01-26 16:57:00 -05:00
Amitai Schlair 9fd09149a3 Mollify strictures about barewords. 2012-01-26 16:55:13 -05:00
Amitai Schlair c9c5264191 Merge branch 'master' of git://git.ikiwiki.info into cvs 2012-01-25 00:41:53 -05:00
Joey Hess bfda13f16c recentchangesdiff: truncate extremely large diffs
A diff was already truncated after 200 lines. But it could still be
arbitrarily enormous, if a spammer or other random noise source likes long
lines. That could use a lot of memory to html encode etc the diff and fill
it into the template. Truncating after 100kb seems sufficient; it allows
for 200 lines of up to 512 characters each.
2012-01-23 18:39:53 -04:00
Joey Hess 100a68f4e2 fix the nodiscount setting 2012-01-23 18:15:14 -04:00
Amitai Schlair 8e99750545 No functional change: sort sub definitions.
In the code:
* general plugin API calls (in plugins/write order),
* VCS plugin API calls (in plugins/write order), then
* internal support routines (in alphabetical order).

In the tests:
* general meta-behavior (in no particular order, yet),
* general plugin API calls (in plugins/write order),
* VCS plugin API calls (in plugins/write order), then
* internal support routines (in semi-logical order).
2012-01-22 10:44:50 -05:00
Joey Hess 18f35269c2 mdwn: Added nodiscount setting, which can be used to avoid using the markdown discount engine, when maximum compatability is needed. 2012-01-16 13:42:30 -04:00
Joey Hess 1572c3c376 attachment: Fix utf-8 display bug. 2012-01-15 16:39:13 -04:00
Joey Hess b38261a03a Workaround discount's eliding of <style> blocks. 2012-01-15 16:19:22 -04:00
Joey Hess 12f86df239 workaround a bug in the discount perl binding
Empty input, or input consisting soley of whitespace
caused an uninitialized value warning.
2012-01-01 17:28:31 -04:00
Joey Hess 9dce803faf discount support
mdwn: Can use the discount markdown library, via the
Text::Markdown::Discount perl module.

This is preferred if available since it's the fastest currently supported
markdown library, speeding up markdown rendering by a factor of 40.

That is to say, when only rendering a lot of markdown, discount is 40x
faster. When building a ikiwiki site, ikiwiki's other overhead gets in the
way, but I still see significant speedups. Building the ikiwiki docwiki
dropped from 62 to 45 seconds, for example.

However, when multimarkdown is enabled, Text::Markdown::Multimarkdown is
still used.

While discount contains some nonstandard markdown extensions,
including tables and footnotes, AFAICS most of them are not
enabled by default in the perl bindings.

I consider sticking to non-extended markdown a desirable thing, since this
is probably not the last markdown engine. In particular, sundown is waiting
in the wings to get packaged and get a perl binding.

----

Reviewing all the showdown extensions, here are the ones that are enabled:

centered paragraphs:

->centered<-

image sizes: [dust mite](http://dust.mite =150x150)

<style>..</style> blocks are eaten. The perl binding does not provide
access to the gathered CSS. This is not legal html anyway, so unlikely
to cause breakage.
2012-01-01 17:28:31 -04:00
Joey Hess b8bf318b91 remove x bit from comments.pm
how did that get set?
2011-12-27 11:37:28 -04:00
Giuseppe Bilotta 7411d1a6ce tag plugin: encode categories using numeric values
This ensures that RSS/Atom feeds produced are valid XML.
2011-12-24 19:43:16 -04:00
Simon McVittie 5333c113d6 Add path and path_natural sort orders
(cherry picked from commit 272e0b2f17)
2011-12-06 14:26:27 -04:00
Joey Hess 6cadcacffd apply Postel's law 2011-11-30 16:25:17 -04:00
Joey Hess 4cb343f348 graphviz: Support wikilinks embedded in the graph.
(Sponsored by The TOVA Company.)
2011-11-30 15:47:13 -04:00
Joey Hess 997116f160 store imagemap in %pagestate, rather than a file
Using a file was sorta not right.

Note that when previewing, %pagestate is not saved, so
it has to rebuild the graph every time until that graph is saved;
then previews can use the cached data until the next time the graph
is changed.

Also note that it's stored in the destpage's pagestate. The imagemap
could vary between a page and an inlined page if wikilinks were supported.
2011-11-30 15:47:12 -04:00
Joey Hess 44863ea234 graphviz: Support urls embedded in the graph, by having graphviz generate an imagemap.
Also, I let preview mode write real files, rather than using data: uri.
Which is ok these days, since ikiwiki tracks files created during
previewing, and cleans them up later.
2011-11-30 15:47:12 -04:00
Joey Hess 41f6363a63 editpage: Fix FormattingHelp link on Discussion pages.
In 875d550f12 I for some reason
made $page be changed when creating a discussion page, which
broke the link on the edit page. Changing page seems unnecessary,
so reverted that part of the change.
2011-11-27 13:19:19 -04:00
Joey Hess 64e09f9968 cannot reproduce 2011-11-23 16:13:16 -04:00
Joey Hess 2872e1d738 cleanup now unused setting 2011-11-17 18:47:51 -04:00
Per Carlson 937c074232 Always use true image size 2011-11-17 22:59:31 +01:00
Simon McVittie d70ba7cff3 Split trail directive into trailitems, trailoptions 2011-11-12 21:37:28 +00:00
Simon McVittie 74b1b2761a trail: update documentation; drop docs for directives, which are now in the wiki 2011-11-12 17:08:08 +00:00
Simon McVittie e0bfd0cafd trail: improve and test sorting 2011-11-12 16:57:54 +00:00
Simon McVittie 0394a49e67 trail: avoid collecting trail members twice 2011-11-12 16:57:27 +00:00
Simon McVittie 272e0b2f17 Add path and path_natural sort orders 2011-11-12 15:11:02 +00:00
Simon McVittie 156f709122 trail: new plugin (3rd attempt) 2011-11-09 22:49:37 +00:00
Joey Hess 875d550f12 Fix handling of discussion page creation links to make discussion pages in the right place and with the right case.
Broken by page case preservation feature added in 3.20110707.
2011-11-06 16:14:04 -04:00
Joey Hess 496874ab27 svn: Support subversion 1.7, which does not have .svn in each subdirectory.
Involved dropping some checks for .svn which didn't add anything, since if
svn is enabled and you point it at a non-svn checkout, you get both pieces.

The tricky part is add and rename, in both cases the new file can be in
some subdirectory that is not added to svn.

For add, turns out svn has a --parents that will deal with this by adding
the intermediate directories to svn as well.

For rename though, --parents fails if the directories exist but are not
yet in svn -- which is exactly the case, since ikiwiki makes them
by calling prep_writefile. So instead, svn add the parent directory,
recursively.

tldr; svn made a reasonable change in dropping the .svn directories from
everywhere, but the semantics of other svn commands, particularly their
pickiness about whether parent directories are in svn or not, means
that without the easy crutch of checking for those .svn directories,
code has to tiptoe around svn to avoid pissing it off.
2011-10-12 19:07:38 -04:00
Joey Hess 5cb0ecc000 Fix web revert of a file deletion.
When reverting, an add is a remove, and a remove is an add.
2011-09-05 14:51:49 -04:00
Joey Hess 35b69392c8 Avoid warning message when generating setup file if highlight is not installed. Closes: #637606
There's a nice message if the plugin is loaded and used and highlight is
not available, and a nice fallback. So no need for this other warning,
which can happen any time all plugins are loaded to generate a setup file.
2011-09-05 13:21:56 -04:00
Joey Hess 7d2b68cd16 inline: When indexing internal pages for searching, use the url of the inlining page. 2011-09-01 11:38:10 -04:00
Joey Hess 4af7b2c14d search: Fix encoding bug in calculation of maximum term size. 2011-08-30 11:37:38 -04:00
Joey Hess 1873095484 Put in a workaround for #622591, by ensuring Search::Xapian gets loaded before Image::Magick. 2011-08-07 11:01:41 -04:00
Joey Hess 5dd414fbe5 mercurial: fix date parsing so test suite passes 2011-07-30 10:52:49 +02:00
Joey Hess 577f5d3837 fix mercurial commit with session but without nickname 2011-07-30 10:46:26 +02:00
Joey Hess ed360d045a Fix escaping of html entities in tag names.
Example case was a tag with & in its name, which resulted in a malformed
rss feed.
2011-07-29 12:54:30 +02:00
Joey Hess 65a7bc4e06 Fix escaping of html entities in permalinks. 2011-07-29 12:37:43 +02:00
Joey Hess 8512ae3ed5 Merge remote-tracking branch 'intrigeri/po' 2011-07-19 14:11:36 -04:00
Joey Hess e04cb1ffd3 mercurial: Implement rcs_diff. (Daniel Andersson) 2011-07-19 11:44:26 -04:00
Joey Hess b4db945b34 mercurial: Make both rcs_getctime and rcs_getmtime fast. (Daniel Andersson) 2011-07-19 11:39:32 -04:00
Joey Hess 86e1dc492f apply the big mercurial patch
* mercurial: openid nicknames are now used when committing. (Daniel Andersson)
* mercurial: implement rcs_commit_staged so comments, attachments, etc
  can be used. (Daniel Andersson)
* mercurial: fix viewing of a diff containing non-utf8 changes.
  (Daniel Andersson)
2011-07-19 11:26:14 -04:00
intrigeri 739554622f Merge commit '3.20110715' into prv/po 2011-07-18 18:41:37 +02:00
intrigeri f5c8fca887 po: add lang_code and lang_name template variables. 2011-07-18 16:39:18 +02:00
Joey Hess 4cd2efef8c fix two recently introduced bugs in rename
* rename: Fix logic error that broke renaming pages when the attachment
  plugin was disabled.
* rename: Fix logic error that bypassed the usual pagespec checks.
2011-07-15 18:46:16 -04:00
Joey Hess 87db6fbb79 only check for held attachments when operating on an attachment 2011-07-15 18:42:00 -04:00
Joey Hess aef85a247a remove debug 2011-07-15 18:41:04 -04:00
Joey Hess d23786cb6c attachment: Bugfix to create directory when moving attachment out of holding area. 2011-07-11 21:35:46 -04:00
Joey Hess 258b75c4f7 attachment: Bugfix to move upload attachments out of holding area when saving. 2011-07-11 18:34:17 -04:00
Joey Hess 9f7d9ab356 Bugfix for trying to attach files to a subpage of the index page. 2011-07-07 20:32:14 -04:00
Joey Hess 506d16a8a0 emails in wikilinks are always email addresses
If a page that looks like an email address exists, it can't be linked to.
But that's unlikely. Better to be consistent; before this change, a
wikilink with an email address in it could link to the email address or a
page, depending on when the page was created and when the page with the
link was updated.
2011-06-29 19:09:23 -04:00
Joey Hess a965e02430 Bugfix for wikilink containing an email address not showing up in brokenlinks list. 2011-06-29 18:35:29 -04:00
Joey Hess a18a62aa30 inline: Handle obfuscated urls, such as the mailto urls generated by markdown when forcing urls absolute.
That took me 5 minutes. If anyone thinks obfuscated email urls stops, or
even slows down spammers, think again.
2011-06-29 18:12:58 -04:00
Joey Hess 6d01db205f Merge remote-tracking branch 'smcv/comments-metadata' 2011-06-29 17:55:53 -04:00
Joey Hess 25b01f9404 Preserve mixed case in page creation links, and when creating a page whose title is mixed case, allow selecting between the mixed case and all lower-case names. 2011-06-29 16:38:32 -04:00
Joey Hess ae1857b43c img: Generate png format thumbnails for svg images.
Imagemagick does not generate svg images very well, but it can convert
them to png quite well.

For browsers that don't yet support displaying svg, this also provides a
workaround; just scale the svg down to get a png. But the workaround is
partial, since scaling the image larger, or leaving it the same size will
cause the original svg to be displayed. Since browsers are actively
improving svg support, this is good enough for me.
2011-06-29 14:40:30 -04:00
Joey Hess ee8ff9d1c7 apply Changaco's patch to make headinganchors more like mediawiki's 2011-06-21 15:22:36 -04:00
Joey Hess b5a669f34b add websetup hook 2011-06-21 15:22:36 -04:00
Joey Hess 886890b82d move headinganchors out of contrib 2011-06-21 15:22:35 -04:00
Joey Hess ace3665f81 improve detection of ajax request
Firefox sent an accept header for application/xml, not application/json,
and also weakened the priority to 0.8. So that stuff is not to be trusted;
instead I found a better way: When an ajax upload is *not* being made,
the Upload Attachment button will be used, so enable ajax if an upload
is being made without that button having been used.

Also, testing with firefox revealed it refused to process a response that
was type application/json, and checking the demo page for the jquery file
upload plugin, it actually returns the json with type text/html. Ugh.
Followed suite.

Now tested with: chromium, chromium (w/o js), firefox, firefox (w/o js),
and w3m.
2011-06-17 15:17:20 -04:00
Joey Hess 6ebb4e262e show ikiwiki error when attachment is rejected 2011-06-16 13:01:23 -04:00
Joey Hess d4a0732752 let thru HTTP_ACCEPT
Needed for attachment to return json when requested.

I think some browsers send Accept: * , so I made sure to check that json
was explicitly listed as to be accepted, as well as having a high
priority.
2011-06-15 20:02:14 -04:00
Joey Hess 54672a3130 bugfixes
Make sure staged attachments sort as earlier, even if they're not really.
2011-06-15 19:48:49 -04:00
Joey Hess b85485aaa2 typo 2011-06-15 19:31:11 -04:00
Joey Hess 8363107a9e use jquery underlay 2011-06-15 19:16:08 -04:00
Joey Hess a695b5b2f8 updated jquery and made it its own underlay 2011-06-15 19:15:06 -04:00
Joey Hess e2b43578a6 load attachment javascript into template the clean way 2011-06-15 19:08:40 -04:00
Joey Hess f77452b7ca WIP 2011-06-15 18:37:12 -04:00
Joey Hess 00c0677588 fix removal of staged attachments 2011-06-15 17:46:08 -04:00
Joey Hess b66261d08b WIP 2011-06-15 15:21:59 -04:00
Joey Hess 176c7f3ff3 implement renaming of held attachments
This is somewhat suboptimal, it does not update links to the renamed file,
or show a result message.
2011-06-14 16:02:09 -04:00
Joey Hess 2e086b3263 remove trailing slash from attachment_holding_dir
If it's passed a filename, it should return the filename inside the holding
dir. If passed a page, the directory sans slash. All code adds the slash.
2011-06-14 15:49:33 -04:00
Joey Hess d4254c7f97 more generic interface 2011-06-14 15:31:58 -04:00
Joey Hess 49e7bc2535 bugfixes 2011-06-14 15:19:23 -04:00
Joey Hess a61849e954 bugfix for attachments of non-index pages 2011-06-14 15:07:34 -04:00
Joey Hess 04b2a4d676 fix removal of helf attachments
Left out confirmation of removal for held attachments because
a) they're not in the wiki yet, so confirmation is a bit unnecessary
b) it would be hard
c) eases later integration of jquery file upload interface

Also changed where attachments of index are held (to match where they're
stored in the srcdir).

Note that the attachment formbuilder hook was made to run last, so that
the list of attachments is not generated before removal, in the fast path
w/o confirm.
2011-06-14 14:44:20 -04:00
Joey Hess c55a32d3e1 fixed previewing of attachments from holding area 2011-06-14 14:08:13 -04:00
Joey Hess d4d2327400 fixed saving attachments on page save
Also saved on preview, but previewing is a bit broken, does not see the
newly saved attachment yet.
2011-06-14 13:59:56 -04:00
Joey Hess e2cb19ed9e attachment list includes new attachments in holding area
Note that it's possible for an attachment in the holding area to be older
than an attachemnt in the wiki with the same name. I intentionally
show the one in the holding area in this (unlikely) case, since saving the
page will overwrite the wiki's file with the held attachment. It does not
seem worth the bother of doing something more intelligent, since in this
case two people have basically conflicted with one-another.. and both
attachment contents will be stored in revision control in case it needs to
be sorted out.

I had to remove the hyperlink for attachments in the holding area, since
they're not yet live on the web. This could be annoying/confusing. Added
a moseover notice instead.
2011-06-14 13:49:41 -04:00
Joey Hess 8619faaa8b untaint and linkpage the page name used in attachment holding directory 2011-06-14 13:41:07 -04:00
Joey Hess 1d951583a6 store filename in holding dir in linkpage form
Avoids any unpleasantness with .. or other special chars in the attachment
filename.
2011-06-14 13:38:37 -04:00
Joey Hess e08daac239 store attachments in holding area; commit to wiki on page save
This makes uploading a lot of attachments somewhat faster, because
the user does not need to wait for a long website refresh after each
upload. Still probably somewhat slow, since ikiwiki has to run for each
upload.

More importantly, this opens the door for integration of things like
the jquery file upload interface, which allow drag-n-drop and multiple
file uploads to be queued and then ran.

It uses rcs_commit_staged, which leaves out tla and mercurual which lack
that, but since rename, remove, autoindex, etc also use that, I think it's
fine for attachments to also depend on it.

The attachment list is currently broken; it does not look in the holding
area yet, and its links to the attached files won't work since they're not
yet in the wiki. previewing is also currently broken.

Work sponsored by TOVA.
2011-06-14 13:34:36 -04:00
Joey Hess 4c96fce144 refactor 2011-06-14 13:06:59 -04:00
Joey Hess 45fb0371db better long filename detection method
Let's just try to write and fall back to a short ugly filename on error.
2011-06-10 19:04:18 -04:00
Joey Hess 8e15f664c4 aggregate: Improve checking for too long aggregated filenames.
Two problems fixed:

1. Files are written with a .ikiwiki-new suffix, which has to be taken into
   account.
2. Need to count length of bytes, not of unicode characters.
2011-06-10 18:47:57 -04:00
Joey Hess f3ed43a1ca encode html 2011-06-09 10:46:09 -04:00
Joey Hess cf707d1654 userlist: New plugin, lets admins see a list of users and their info. 2011-06-09 10:10:27 -04:00
Simon McVittie aae95b8d54 comments: collect metadata in a scan-phase preprocess hook 2011-06-04 16:55:02 +01:00
Joey Hess d7c4001748 search: Update search page when page.tmpl or searchquery.tmpl are locally modified. 2011-06-03 20:31:20 -04:00
Joey Hess 50d2704db6 Merge remote-tracking branch 'intrigeri/po' 2011-06-03 12:36:30 -04:00
intrigeri 8084c79f92 po: set Locale::Po4a::Xml's ontagerror option to warn only. 2011-05-26 16:54:29 +02:00
intrigeri 3cd0c1f91a po: support language codes in the form of 'es_AR', and 'arn'.
... additionally to the previously supported two-letters codes.
2011-05-26 09:39:50 +02:00
Joey Hess b3720582ab allow for a html formatted description in websetup
w/o polluting setup file with the html
2011-05-13 18:44:11 -04:00
Joey Hess b2754fa272 openid: also use Net::INET6Glue if available 2011-05-09 18:15:35 -04:00
Joey Hess 825f81340a aggregate, pinger: Use Net::INET6Glue if available to support making ipv6 connections.
Making outgoing ipv6 connections for openid auth is still broken; the glue
module does not seem to solve that, so I did not make openid use it.
2011-05-09 14:00:48 -04:00
Joey Hess 9838bec93c HTML::Entities::encode_numeric is not exported 2011-04-30 17:17:19 -04:00
Joey Hess bad5072c02 tag: Avoid autocreating multiple tag pages that vary only in capitalization. The first capitalization seen of a tag will be used for the tag page.
Arguably, the real bug is in the interface to add_autofile, but since
that does take a filename, not a page name, it cannot really do case
handling on its own. The only other users of add_autofile in ikiwiki proper
is autoindex, and it always uses one case. Other third party plugins might
also need to add similar workarounds though.
2011-04-30 16:30:07 -04:00
Joey Hess 270fd45c5d meta: Add FOAF support. Closes: #623156 (Jonas Smedegaard) 2011-04-21 19:52:39 -04:00
Jonas Smedegaard 338e49df15 Fix syntax of recently added JavaScript syntax in meta.pm (<script /> apparently does not work). 2011-04-17 17:56:52 -04:00
Joey Hess d22489299a meta: Fix bug in loading of HTML::Entities that can break inline archive=yes (mostly masked by other plugins that load the module). 2011-04-12 12:30:24 -04:00
Joey Hess 02d30b1552 Merge remote-tracking branch 'levitte/master' 2011-03-30 14:12:14 -04:00
Joey Hess bb44bac175 look up avatar at comment post time
There is a tension between looking up the avatar at post time
and build time. I have not yet decided which is better.

Lookup at build time has the benefit that if a user changes their
email address, or sets up their own federated libravatar
server, on rebuild their new avatar will show up.

It also allows getting a https version of the avatar easily if
the site was using http but was changed to use https.

And it can look up avatars for posts that have already been made.
Which is a nice thing, especially as we roll this out, eh?

But it has a drawback, that it depends on the sessiondb contents
for emails and so rebuilding a site w/o that will lose info.

And, it means dns lookups every time a comment is rendered. A page
with a lot of comments on it would render them all whenever another is
posted or the page is changed, and that could significantly slow things
down. (This could be amelorated by caching the lookups.)

Since I'm undecided, I have moved it into a function that could be called
either way. Currently looking up only at post time.
2011-03-30 11:24:01 -04:00
Joey Hess 51e8a4eeda check site url for https
HTTPS won't be set when rebuilding a site at the command line
2011-03-30 11:00:55 -04:00
Richard Levitte 9b5a5c1823 * IkiWiki/Plugin/monotone.pm: monotone v0.48 has a small error that
affects rcs_getctime.  A small adjustment takes care of that.
2011-03-30 16:59:01 +02:00
Richard Levitte 83de1e4f1d * IkiWiki/Plugin/monotone.pm: implement rcs_getmtime 2011-03-30 16:56:15 +02:00
Joey Hess f4262696ad robustness fix
Don't fail if libravatar fails for some reason. Reasons I can think
of:

* too old version to do openid lookups (fall back to email lookup)
* network problem perhaps
2011-03-30 10:54:24 -04:00
Joey Hess c8cf2d1ed7 indentation 2011-03-30 10:48:57 -04:00
Francois Marier e2e1b1cd20 comments: add OpenID-based avatars (libravatar.org)
This requires version 1.04 or later of Libravatar::URL.
2011-03-30 20:59:18 +13:00
Francois Marier 83056abb87 comments: serve avatars over https in https wikis 2011-03-30 20:59:17 +13:00
Francois Marier 7723e94218 comments: add avatar picture of comment author
Use Libravatar::URL to pull the avatar picture for the comment
author if we have an email address for him/her.
2011-03-30 20:59:17 +13:00
Giuseppe Bilotta 7e7dea078b meta plugin: script support
(cherry picked from commit 44c5b27f88fdbfb4fdd061f600039e490eaeff92)
2011-03-28 13:08:20 -04:00
Joey Hess be02a80b7a meta: Security fix; don't allow alternative stylesheets to be added on pages where the htmlscrubber is enabled. 2011-03-28 12:21:12 -04:00
Joey Hess a0e31f38d5 comment: Better fix to avoid showing comments of subpages, while not breaking manual inlining of comments. 2011-03-28 11:53:55 -04:00
Joey Hess 6908406989 Revert "comment: Don't show comments of subpages on parent pages. (Fixes bug introduced in version 3.20100505.)"
This reverts commit b34d31142b.

This was the wrong approach. It broke inlining of comment(*) on eg, a
toplevel comment page.
2011-03-28 11:42:21 -04:00
Joey Hess 7821965ef0 fix targetpage replacement to support 3 argument form
Oddly, this hadn't caused any visible breakage. Possibly inline,
which is the only thing to use targetpage, resolves the function
to the "real" one before po gets loaded?
2011-03-24 19:44:32 -04:00
Joey Hess f39d02583a avoid stomping on inline's rootpage sub if it's not already present
If the inline plugin is not being loaded, or is perhaps loaded after po
(when IkiWiki::Setup::getsetup loads all the plugins, for example),
po should not inject its custom rootpage sub, as that will lead to a
redefinition error message when inline loads.
2011-03-24 17:55:03 -04:00
Joey Hess 5c8fb38623 fix var name 2011-03-21 16:40:11 -04:00
Joey Hess 37bbec8c3c comment about locking 2011-03-21 14:44:43 -04:00
Joey Hess 1013217523 call aggregate checkconfig last
Since the plugin abuses the checkconfig hook to launch aggregation when in
--aggregate mode, it should give other plugins that have checkconfig hooks
a chance to run before they are possibly used in rendering the aggregated
content.
2011-03-21 14:32:46 -04:00
Joey Hess b02d3746e1 aggregate: Read cookies from ~/.ikiwiki/cookies by default. Also, the cookiejar configuration setting can be used by other plugins to provide a custom `cookie_jar` object for LWP::UserAgent. (Thanks, schmonz) 2011-03-21 14:19:21 -04:00
Joey Hess 7e4a0c2930 darcs: Fix multiple issues preventing rcs_diff from working. 2011-03-02 12:39:58 -04:00
Joey Hess b34d31142b comment: Don't show comments of subpages on parent pages. (Fixes bug introduced in version 3.20100505.) 2011-02-27 18:16:07 -04:00
Joey Hess ecd2153a70 avoid uninitialized value warning when running -dumpsetup
Here wikistatedir has not been configured.
2011-02-25 17:32:36 -04:00
Giuseppe Bilotta 27a80dc40a inline: allow assigning an id to postform/feedlink
This allows per-form/feedlink group customization without having to
resort to counting.
(cherry picked from commit b134feb0dc2d9a8ff7ae447537fa8bc02811aabd)
2011-02-22 17:33:07 -04:00
Giuseppe Bilotta 72c8f01b36 inline: base feed urls on included page name
Second (forgotten) half of bb8f76a4a0.
This ensures that the link URL and page title in the feed are the
correct ones.
2011-02-22 17:23:08 -04:00
Joey Hess da371733b5 Merge remote branch 'smcv/ready/transient-recentchanges' 2011-02-09 15:12:34 -04:00
Giuseppe Bilotta 2d5c2f301c map: don't create useless </ul><ul> sequences
With the previous logic, same-level items would go down one level and
then again up one level closing and re-opening UL tags each time. The
resulting redundant lists caused whitespace layout issues in the
rendered pages.

Adjust the "moving up?" logic to check if the current item base is
different from the previous item _base_. Adjust the "going down?" logic
by moving it to an earlier phase and checking for (1) parent item not being
what it should be and (2) remaining bits; the root is grown unconditionally as
long as (2) is verified.
2011-02-09 14:39:28 -04:00
Joey Hess 8e8311718a Merge remote branch 'smcv/ready/transient-tag'
Conflicts:
	t/tag.t
2011-02-09 14:11:06 -04:00
Joey Hess b522d8cdda Merge remote branch 'smcv/ready/transient-autoindex' 2011-02-09 14:00:59 -04:00
Joey Hess 91a408ec77 minor optimisation
Assume the aggregated content is only going to be in one of the
directories, and so stop if it's successfully removed from the
transientdir.
2011-02-09 13:56:05 -04:00
Joey Hess 3d7147992a Merge remote branch 'smcv/ready/transient-aggregate' 2011-02-09 13:50:03 -04:00
Joey Hess 230b7d4d6e Merge remote branch 'smcv/transient-relative-api' 2011-02-09 13:47:03 -04:00
Joey Hess acd1052298 Merge remote branch 'smcv/ready/transient' 2011-02-09 13:42:15 -04:00
Joey Hess 8e604c0f0a htmltidy: Avoid breaking the sidebar when websetup is running.
Problem was this: websetup loads all plugins, but does not checkconfig
them. So, htmltidy's recently added configurable command setting was unset;
this resulted in its sanitize hook failing; the sanitize hook is called
when a sidebar was enabled, and this caused the sidebar to not display.

I put in a fix, but the underlying problem is that websetup loads all
plugins but leaves them in an unconfigured and possibly broken state while
trying to display its forms.

Probably the long-term fix is to have it cache the original hook states from
before loading the plugins, and restore it after getting their configuration.
Or, even to get the configuration using a subprocess, as plugins may do things
outside the hook system.
2011-02-03 12:49:13 -04:00
Joey Hess b752e7fec4 editpage: Avoid inheriting internal page types. 2011-02-01 21:01:26 -04:00
Joey Hess 726e0de7d7 run po checkconfig last so it can see underlays added in other checkconfig hooks 2011-01-25 15:39:58 -04:00
Joey Hess 80452eba92 inline: Fix regression in feed titles. Closes: #610878 (Thanks, Paul Wise) 2011-01-24 17:01:01 -04:00
Joey Hess 1640d12102 blogspam: Don't check modifications from admins for spam, and also allow the blogspam_pagespec to do other matches against who the user is. 2011-01-24 16:59:15 -04:00
Joey Hess 2be49b623a bleagh 2011-01-24 16:56:28 -04:00
Joey Hess c1c69db749 fix uninitilized value warning on bad page name
properly this time
2011-01-23 17:36:27 -04:00
Joey Hess 73364d2b29 Revert "fix uninitilized value warning on bad page name"
This reverts commit 5d3998555f.

That broke posting via blog form.
2011-01-23 10:11:46 -04:00