Commit Graph

2412 Commits (30a3efda58cdf10219bdbf4453354d7d07b2bcad)

Author SHA1 Message Date
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
Simon McVittie 44547af279 autoindex: default to autoindex_commit=1 as intended 2011-01-22 22:37:46 +00:00
Simon McVittie 01d812decb Don't create autoindex pages just because of transient things 2011-01-22 22:37:14 +00:00
Simon McVittie 059259ecd1 Allow autoindex files to be written into the transient underlay
As with the tag plugin, for the moment keep the old behaviour in the test.
2011-01-22 22:36:41 +00:00
Simon McVittie 594a919456 Merge branch 'ready/autoindex-autofile' into HEAD 2011-01-22 22:35:37 +00:00
Simon McVittie 8ee9eabb1c autoindex: stop tracking deletions, use generic autofile tracking instead
- Migrate the set of deletions to the {autofile} set, since it has
  more or less the same effect. This affects the "deleted" case in the
  test.
- If a page has just been deleted, add it as an autofile anyway: by
  the time gen_autofile is called, it'll be in the list of deleted files,
  so it'll just be added to {autofile}. This affects the "gone" case
  in the test.
- Behaviour change: we don't forget that a page with no reason to be
  re-created was deleted. This affects the 'expunged' and 'reinstated'
  cases in the test.
2011-01-22 22:28:50 +00:00
Simon McVittie dca6679a54 autoindex: use add_autofile
This does cause a minor regression: index pages are now committed
individually rather than being a single commit per rebuild.

This also means the autoindex regression test needs to trigger the
autofile generation pass.
2011-01-22 22:25:48 +00:00
Joey Hess b5d7469830 rename: Fix crash when renaming a page that is linked to by a page in an underlay.
Skip fixing links in such pages. The user will get a list of pages that
still link to the old page.
2011-01-22 10:20:38 -04:00
Joey Hess dcfeaaad5b comments: Fix XSS security hole due to missing validation of page name.
Values have to be checked against wiki_file_regexp, not just file_pruned.
Audited the rest of the code base for similar problems, found none.
2011-01-22 10:15:33 -04:00
Joey Hess 5d3998555f fix uninitilized value warning on bad page name 2011-01-22 10:07:37 -04:00
Simon McVittie d851ae76f6 Put newly aggregated pages in the transient underlay 2011-01-07 20:19:58 +00:00
Simon McVittie 512d860c16 Only unlink excess recentchanges from srcdir if not in transientdir 2011-01-07 20:13:01 +00:00
Simon McVittie 44abf016b3 Put recent changes in the transient underlay 2011-01-07 20:13:01 +00:00
Simon McVittie 40f85e5c91 tag: default to tag_autocreate_commit=1 as intended 2011-01-07 20:11:38 +00:00
Simon McVittie 2a60cda172 tag: optionally write autocreated tags to the transient underlay
For the moment, have the tag test keep the old behaviour.
2011-01-07 20:09:52 +00:00
Simon McVittie dff44e4a6d Add add_literal_underlay and use it for the transient underlay
This means we don't need to import Cwd and use abs_path.
2011-01-07 20:04:45 +00:00
Simon McVittie 44b0cea85f Assume obsolete transient pages have the same extension as the changed page 2011-01-07 19:50:34 +00:00
Simon McVittie c7bf305c81 GC unused pages in the transient underlay 2011-01-07 18:53:27 +00:00
Simon McVittie 8250c3a457 Add transient plugin, which adds ~/.ikiwiki/transient as an underlay
This can contain auto-generated things, like tag pages; if edited
they'll automatically migrate into source code control.
2011-01-07 18:53:27 +00:00
Joey Hess 56259466ee reword feed descs 2011-01-06 14:42:23 -04:00
Giuseppe Bilotta 962b1c130c inline: pass the Atom/RSS titles to the templates
The default templates are also updated to make use of this information.
The rel="alternate" attribute is also inserted, for completeness.
(cherry picked from commit 618ade535e6a7967a510d9e210edaef3d37cc9bc)
2011-01-06 14:40:33 -04:00
Joey Hess d991ccf134 use cgitemplate, remove misctemplate 2011-01-05 17:15:38 -04:00
Joey Hess 4a6ac6b485 add cgitemplate
cgitemplate is a modified misctemplate that takes an optional cgi object
and uses it to set the baseurl, and also optionally the forcebaseurl,
if a page is provided.

If no cgi object is provided, it will fall back to using $config{url}.
I expect this will only be needed in exceptional cases where
that doesn't much matter, such as cgierror().

showform uses cgitemplate, so there is no more need for showform_preview.
2011-01-05 17:06:11 -04:00
Joey Hess ea734d451c better handling of relative permalinks
This way, do=goto will go to the page relative to
the current location, while the permalinks in feeds
will be absolute (unless an url is not configured at all).
2011-01-05 16:26:09 -04:00
Joey Hess c91b39fdb5 factored out an urlabs from aggregate and cgi 2011-01-05 16:18:25 -04:00
Joey Hess 3eabf323f0 Fix permalinks to recentchanges items and comments, broken by last release.
permalinks always need to be full urls
2011-01-05 15:22:55 -04:00
Joey Hess 9efe370fa0 remove old unused baseurl parameter
This was I think a relic from when BASEURL was used in more templates than
use it now.
2011-01-05 14:57:26 -04:00
Joey Hess 8c9c3915ec Fix base url when previewing. Was broken by urlto changes in last release.
Added a showform_preview that is like showform, but sets forcebaseurl
to point to the page being previewed.
2011-01-05 13:50:42 -04:00
Giuseppe Bilotta 5365a72e42 unescape tag names
Since tag names are now retrieved from the file names, we must revert
the escaping process that santizes the file names. Solve by adding a
`pagetitle()` call at the end of the tagname()
(cherry picked from commit 0ee0612b1ab11d76eb3790c8db7a2ba992c54f6b)
2011-01-05 12:06:36 -04:00
Joey Hess 1b1b3927ee fix patch to not strip a leading "." unless it's part of a path
For correctness only, since a tag named ".foo" is very unlikely.
2011-01-04 15:59:28 -04:00
Joey Hess fc6c0e8b5b fix patch to not expose config setting as a regexp 2011-01-04 15:59:00 -04:00
Giuseppe Bilotta a17469e388 tag name sanitation
The use of typed links for tags and some of the consequent changes
introduced some unwanted functionality variations in the tag system. Two
problems in particular could be observed, when compared to the use of
tags in older versions of IkiWiki:

* tags in feeds (both rss and atom) would use the file path as their
  name (e.g. you would have <category term="tags/sometag" /> in an atom
  item for a page tagged sometag with a tagbase of tags), whereas they
  appeared pure before
* tags containing a slash character would appear without the slash
  character but be used with the slash character in other circumstances
  (effect visible by tagging a page with a name such as "with/slash")

Both of these issues are fixed by introducing a tagname() function that
takes a tag link and effectively reverses (as well as possible) the
effects of taglink().

A possible alternative route would have been the reintroduction of the
global %tags hash, but the new approach as the (arguable) benefit of
introducing a small layer of sanitation for tag names.
2011-01-04 15:58:42 -04:00
Joey Hess 69b9fd132d remove second parameter to include_javascript
function used to take a second parameter to control absoluteness, no longer
does
2011-01-02 18:33:05 -04:00
Joey Hess 7d0ef85d80 git: Fix bug involving attempting to web revert a commit that included changes to attachments. 2010-12-29 20:19:58 -04:00
Joey Hess 8517aa8687 bugfix 2010-12-29 20:10:28 -04:00
Joey Hess 4fb26f4e60 Add a second parameter to the rcs_diff hook, and avoid bloating memory reading in enormous commits. 2010-12-29 19:58:49 -04:00
David Bremner ab511bb39c Update highlight plugin for highlight api.
Note that in particular calling initTheme with and empty file does not
work anymore.

use of initLanguage was replaced by loadLanguage, which seems to work
in both places.

I tried to make it a bit more robust against missing a highlight package.
There are lots of warnings, but it no longer crashes.
2010-12-29 13:05:20 -04:00
Thomas Keller 6379737970 monotone.pm: while we're still only checking the major and minor
part of the version number of the monotone binary, we do not want
to give false alarm on patch or development versions
2010-12-28 01:55:12 +01:00
Paul Menzel 68e333e0bd teximg: Use `\[` and `\]` instead of not recommended `$$`.
It is not recommended to use the double dollar symbol `$$` to set displayed math [1][2].

[1] http://en.wikibooks.org/wiki/LaTeX/Mathematics
[2] http://www.math.uiuc.edu/~hildebr/tex/displays.html

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
2010-12-26 14:46:29 -04:00
Joey Hess 326c4d6af2 use CGI->url to get current absolute cgi url for openid login process 2010-12-25 15:08:22 -04:00
Joey Hess 93d7368a32 revert cgiurl change that broke openid login 2010-12-25 14:23:55 -04:00
Joey Hess beae7ef9db editpage, comment: Clean up title when editing or creating a page or comment.
Now that page.tmpl is used for cgi, the parentlinks are able to be
displayed even when creating or editing a page. So it's redundant to
include the path to the page in the title, remove it.
2010-12-25 13:38:26 -04:00
Joey Hess 9741a3f979 inline: Force an absolute page location when the inline postform is used.
There seems no need to allow selecting a location when creating a page this
way; the user should always want it to appear in the inline whose form they
submitted.
2010-12-25 13:32:57 -04:00
Joey Hess 80e3f7c309 indent 2010-12-25 13:23:23 -04:00