Commit Graph

1872 Commits (33b0a69e90f4c2e22fe0e0c812836a2eb661c6d2)

Author SHA1 Message Date
Joey Hess 0e68f76a9a update 2010-04-23 15:23:34 -04:00
Joey Hess d1cc7e81c8 use template() rather than rolling it by hand 2010-04-23 15:11:25 -04:00
Joey Hess ee8d237f98 improved error message 2010-04-23 14:50:00 -04:00
Joey Hess 753bfb17a0 switch to using template_depends
It now handles all the details of finding a page template that this used to
need to implement.
2010-04-23 14:45:48 -04:00
Joey Hess d4d7d5ddaf use same error string as template.pm does 2010-04-23 14:45:02 -04:00
Joey Hess 011d88052d fix logic 2010-04-23 14:00:53 -04:00
Joey Hess abd2339312 look for templates in srcdir and underlays, first
This entailed changing template_params; it no longer takes the template
filename as its first parameter.

Add template_depends to api and replace calls to template() with
template_depends() in appropriate places, where a dependency should be
added on the template.

Other plugins don't use template(), so will need further work.

Also, includes are disabled for security. Enabling includes only when using
templates from the templatedir would be nice, but would add a lot of
complexity to the implementation.
2010-04-22 15:55:58 -04:00
Joey Hess 23d62f42bd remove add_templates option
Templates are moving into the srcdir, and will also be searched for in
configured underlays, so this is redundant.
2010-04-22 14:35:00 -04:00
Joey Hess 3ee571390e Merge branch 'autotag' 2010-04-22 00:34:03 -04:00
Joey Hess bc6d602609 add influence info for failed metadata matches
This is needed so that when a negated pagespec like "!author(foo)"
stops matching, due to the page being changed, ikiwiki knows that
the match was influenced by the page content.
2010-04-22 00:10:13 -04:00
Joey Hess d048e9c64a turn on tag_autocreate by default if tagbase is set 2010-04-21 20:39:20 -04:00
Joey Hess 20052f8882 Merge branch 'master' into autotag
Conflicts:
	IkiWiki/Plugin/tag.pm
2010-04-21 20:19:06 -04:00
Joey Hess 129cd00bdb remove broken ./tag support
The commit that added the (working) support for using /tag to override
tagbase also tried to make ./tag work. Problem is, tags are links,
and ./foo is not a valid link (though I think there's a wishlist about it).

So, using ./tag really resulted in tag creation links that led to a
"bad page name" error. And even if the tag were created in the right place,
the link didn't go to it.
2010-04-21 20:15:11 -04:00
Joey Hess 752ccf8b48 fixes 2010-04-21 20:08:23 -04:00
Joey Hess 0e2b5ebe31 clarify 2010-04-21 19:49:11 -04:00
Joey Hess 789e68a8b1 Merge branch 'master' into autotag
Conflicts:
	IkiWiki/Plugin/tag.pm
2010-04-21 19:47:38 -04:00
Joey Hess 77779dc4a0 pass pagespec parameters along from match_tagged 2010-04-21 19:46:27 -04:00
Joey Hess 8cde2365e4 add separate template variable for tag page and sanitize displayed tag name 2010-04-21 19:13:03 -04:00
Joey Hess fd6fb4c507 commit autocreated tag pages 2010-04-21 16:13:37 -04:00
Joey Hess 34e8c78c1c Merge branch 'master' into autotag 2010-04-20 18:19:00 -04:00
Joey Hess 64946f9198 Merge branch 'file_pruned_revamp' 2010-04-20 18:18:39 -04:00
Joey Hess 511f7f9cb9 bugfix
So this is the one place that does need to canonpath and compare,
as two argument file_pruned used to.
2010-04-20 18:16:40 -04:00
Joey Hess d578f3ff78 darcs: ensure whole darcs query manifest output is consumed
By a stroke of luck, after a long & full day, I happened to
remember that in the morning, I had seen someone on irc mention
that darcs query manifest doesn't like it if its full output
is not consumed.

So contrary to the usual case where bug reports sent via irc are like
messages written in sand before the new tide, this one was seen and
fixed.

(But use http://ikiwiki.info/bugs/ next time!)
2010-04-20 17:49:00 -04:00
Joey Hess bfca8345ea bugfix
Avoid file_pruned triggering on absolute paths causing the whole
comments_pending directory being pruned.

Simplify code.
2010-04-20 17:42:36 -04:00
Joey Hess 808a4249fc Merge branch 'master' into file_pruned_revamp 2010-04-20 17:26:40 -04:00
Joey Hess 93cf1db7b9 fix uninitialized value warning
$cgi->params('do') may not be defined. The CSRF code may delete all
cgi params. This uninitalized value was introduced when do=register
support was added recently.
2010-04-20 17:21:50 -04:00
Joey Hess 81eae1a531 typo 2010-04-20 14:25:17 -04:00
Joey Hess 59bb1f1db3 fix stat to use unmunged filename 2010-04-20 14:23:48 -04:00
Joey Hess 1f56dead00 oops, fix for no_chdir mode
$_ will be absolute then
2010-04-20 14:21:31 -04:00
Joey Hess 6d063a6698 switch to 1 parameter version of file_pruned
Another bit of code that didn't realize that File::Find sets $_ to the
relative filename.
2010-04-20 14:06:00 -04:00
Joey Hess 230a8b22a4 remove explicit absolute test
file_pruned now tests for that
2010-04-20 13:59:17 -04:00
Joey Hess 5d3f787729 use one parameter form of file_pruned here too
In File::Find, $_ is relative to the current directory, so that is ok.
Also, the directory name doesn't need to be stripped from $_.
2010-04-20 13:54:24 -04:00
Joey Hess 7a92c0aa4a clarify why absolute is tested & stripped here
file_prune also fails on absolute filenames now
2010-04-20 13:49:46 -04:00
Joey Hess ca33969823 Merge branch 'master' into file_pruned_revamp 2010-04-20 13:43:21 -04:00
Joey Hess 1239fa55d5 no need to return content from postscan hook 2010-04-20 00:07:41 -04:00
Joey Hess a97964688b unfinished file_prune revamp
Many calls to file_prune were incorrectly calling it with 2 parameters.
In cases where the filename being checked is relative to the srcdir,
that is not needed.

Made absolute filenames be pruned. (This won't work for the 2 parameter call
style.)
2010-04-17 19:05:40 -04:00
Joey Hess 2fc342b048 fix autotag behavior for relative tags
A tag like ./foo is searched for relative to the tagging page.
However, if multiple pages use such a tag, the only one sure
to be in common is in the root, so autocreate it there to
avoid scattering redunadant autocreated tags around the tree.

(This is probably not ideal.)

Also renamed the tagpage and taglink functions for clarity.
2010-04-17 16:01:41 -04:00
Joey Hess b00d8771cc call gentag for taglinks too 2010-04-17 15:48:00 -04:00
Joey Hess 3651e6263c fix autofile call 2010-04-17 15:43:58 -04:00
Joey Hess adc196a8b5 tag_autocreate fixups
Fix style of prompt.
Optional to rebuild when it is changed. (Needed to get new all missing tags)
2010-04-17 15:41:45 -04:00
Joey Hess 2f9504a10d bzr: changelog and refactor 2010-04-17 13:55:38 -04:00
Jelmer Vernooij 9ff5174f11 Fix get_ctime implementation in Bazaar plugin, add get_mtime implementation. 2010-04-17 13:52:16 -04:00
Joey Hess b7d50abc0f refactor autofiles
Made add_autofile take a generator function, and just register the
autofile, for later possible creation. The testing is moved into Render,
which allows cleaning up some stuff.
2010-04-17 13:35:15 -04:00
Joey Hess 54f600af14 Merge remote branch 'davrieb/autotag' into autotag
Conflicts:
	IkiWiki.pm
	IkiWiki/Plugin/tag.pm
2010-04-17 12:50:23 -04:00
Joey Hess c769a33392 autoindex: Switch to using %wikistate instead of abusing $pagestate{index}. 2010-04-17 12:20:50 -04:00
Joey Hess 9265ce85b6 squelch warning 2010-04-16 19:23:11 -04:00
Joey Hess b13bb0c83c implement rcs_getmtime for svn
This is a slow implementation; it runs svn log once per file
still, rather than running svn log once on the whole srcdir.

I did it this way because in my experience, svn log, run on a directory,
does not always list every change to files inside that directory.
I don't know why, and I use svn as little as possible these days.
2010-04-16 18:46:20 -04:00
Joey Hess dee2940c0b automatically run --gettime, and optimise it for git
* Automatically run --gettime the first time ikiwiki is run on
  a given srcdir.
* Optimise --gettime for git, so it's appropriatly screamingly
  fast. (This could be done for other backends too.)
* However, --gettime for git no longer follows renames.
* Use above to fix up timestamps on docwiki, as well as ensure that
  timestamps on basewiki files shipped in the deb are sane.
2010-04-16 18:30:56 -04:00
Joey Hess b14f84c4ac --gettime revamp
* Rename --getctime to --gettime. (The old name still works for
  backwards compatability.)
* --gettime now also looks up last modification time.
* Add rcs_getmtime to plugin API; currently only implemented
  for git.
2010-04-16 17:02:29 -04:00
Joey Hess dd64c2a9c0 sidebar plugin optimisations
The pagetemplate hook may be called multiple times, for example when pages
are inlined into a page. Sidebars were being calculated each time that
happened, only to be thrown away when the final pagetemplate hook was
called. Avoid this unnecessary work.

Remove stored sidebar content on use to save some memory.
2010-04-15 22:18:56 -04:00