Commit Graph

3161 Commits (6d90e56c8dbb1e380f0e621305fd014767e9364b)

Author SHA1 Message Date
Amitai Schlair 137ed653ea Merge branch 'master' into fancypodcast
Conflicts:
	doc/todo/fancypodcast.mdwn
2013-03-17 15:01:13 -04:00
Michal Sojka c42fd7d758 Add configuration to restrict the formats allowed for comments
I want to write my blog posts in a convenient format (Emacs org mode)
but do not want commenters to be able to use this format for security
reasons. This patch allows to configure which formats are allowed for
writing comments.

Effectively, it restricts the formats enabled with add_plugin to those
mentioned in comments_allowformats. If this is empty, all formats are
allowed, which is the behavior without this patch.
2013-03-05 11:00:29 +01:00
Joey Hess b1a721942d Merge remote-tracking branch 'smcv/ready/map' 2013-03-04 18:29:58 -04:00
Joey Hess 8c8aa3fe47 Detect plugins with a broken getsetup and warn. 2013-03-04 13:19:05 -04:00
Joey Hess 1d6eb13e2b Add missing plugin section, and deal with missing sections with a warning. 2013-03-04 13:03:34 -04:00
Simon McVittie af8712cfac map: postprocess to collapse useless </ul><ul> sequences
This re-fixes the same bug as 2d5c2f30, but without introducing
malformed HTML in some situations. This is not a very elegant
solution, but it has the advantage of passing more tests.
2013-02-24 13:10:24 +00:00
Simon McVittie 3f27a97336 Optionally add indentation to maps
This makes them easier to debug by showing the structure. Sample output
when $spaces is set to 4 spaces:

<div class='map'>
<ul>
    <li>
    <a href="../alpha" class="mapparent">alpha</a>
        <ul>
        <li>
        <a href="../alpha/1" class="mapitem">1</a>
        </li>
        </ul>
    </li>
    <li>
    <a href="../beta" class="mapitem">beta</a>
    </li>
</ul>
</div>
2013-02-24 13:10:24 +00:00
Simon McVittie ce1c7a3eab Revert "map: don't create useless </ul><ul> sequences"
This reverts commit 2d5c2f301c.
2013-02-24 13:10:24 +00:00
Amitai Schlair 4b6ea05ac8 Catch up rsspage to atompage. Validates. 2013-02-22 12:54:16 -05:00
Amitai Schlair d77ee60b15 Render fancy podcast enclosures.
Simple podcast feeds didn't have content tags and I made sure to
keep it that way. This may be unnecessarily conservative. Changing
the behavior to include empty content tags might be fine, but I
don't want to think about it right now, I just want my tests to
keep passing!

The new fancy-podcast tests are copy-pasted-edited from the
simple-podcast tests. These tests shall be refactored.
2013-02-20 21:16:19 -05:00
Amitai Schlair a629b276b2 Extract genenclosure(). No functional change intended. 2013-02-20 20:53:50 -05:00
Amitai Schlair 3d2be49420 Make enclosures absolute (in feeds they have to be). 2013-02-20 19:14:20 -05:00
Amitai Schlair c3b17740ae Document that last enclosure wins. 2013-02-19 20:22:47 -05:00
Amitai Schlair 0e278c4a84 Make enclosure follow WikiLink LinkingRules. 2013-02-19 20:22:46 -05:00
Amitai Schlair 546da9bac7 Make [[!meta enclosure=foo.mp3]] "work" for HTML. 2013-02-19 20:22:46 -05:00
Joey Hess 480d6f93c1 highlight: Now adds a span with class highlight-<extension> around highlighted content, allowing for language-specific css styling. 2013-02-12 11:27:29 -04:00
Amitai Schlair 91b477c087 Fix diffurl links (cvsweb expects unescaped '/'). 2013-02-02 14:11:15 -05:00
Amitai Schlair 0f3f809a45 Merge branch 'master' into cvs 2013-02-02 13:02:26 -05:00
Joey Hess 82114f4451 Deal with empty diffurl in configuration. 2013-01-29 08:12:56 +11:00
Amitai Schlair b30cacdf8d Fix longstanding bug (chdir to nonexistent dirs).
In test, set up the post-commit hook for more realism (and bugs!).
To make wrappers work in test, set PERL5LIB, and allow the wrappee's
path to be overridden. Meta-test that post-commit is really hooked
up by verifying that content is getting generated in destdir.

About the longstanding bug, which as far as I know was harmless:
CVS can't operate outside a srcdir, so we're always setting $CWD.
"local $CWD" restores the previous value when we go out of scope.
Usually that's correct. But if we're removing the last file from a
directory, the post-commit hook will exec in a working directory
that's about to not exist (CVS will prune it).

The fix: chdir() manually in cvs_runcvs(), so we can selectively
not chdir() back.
2013-01-27 22:09:57 -05:00
Amitai Schlair 64370885cc Merge branch 'master' into cvs 2013-01-25 08:47:17 -05:00
Joey Hess e5d82ef868 trail: Avoid massive slowdown caused by pagetemplate hook when displaying dynamic cgi pages, which cannot use trail anyway.
This seemed to be due to the pagetemplate hook calling prerender. I've
observed this making it take *minutes* for the signin page to be displayed.
ltracing ikiwiki showed it was matching pagespecs a lot.

It may be that this is still a speed pain point when rendering pages, not
just for CGI. So more work may be needed here.
2013-01-24 10:40:35 +11:00
Joey Hess 37cf511f06 poll: Add expandable option to allow users to easily add new choices to a poll. 2013-01-10 12:43:27 -04:00
Joey Hess 7173ef1b13 htmlscrubber: Allow the URI schemes of major VCS's. 2013-01-05 17:25:47 -04:00
Joey Hess 22cb87c684 Merge remote-tracking branch 'smcv/ready/trail' 2013-01-02 15:31:10 -04:00
Simon McVittie 7029f98bc7 trail: remove excess presence-dependencies
Since trail members are explicitly rebuilt if the information used for
their prev/up/next boxes changes, they don't need another dependency
on the trail itself. (If the trail disappears, it will disappear from
the member's member_to_trails entry, causing a rebuild; so the add_depends
is redundant.)

Similarly, since trail members are explicitly rebuilt if their next
or previous item, or its title, changes, the presence dependencies on the
next and previous items are redundant.
2013-01-02 19:19:32 +00:00
Simon McVittie 7b06a65221 If the title of a trail or trail-member changes, rebuild affected pages
If the title of a trail changes, each member of that trail must be
rebuilt, for its prev/up/next box to reflect the new title.

If the title of a member changes, its next and previous items (if any)
must be rebuilt, for their prev/up/next boxes to reflect the new title.
2013-01-02 19:19:32 +00:00
Simon McVittie 1daa68b8b7 trail: call prerender from build_affected
In the unlikely event that the ordered contents of a trail have changed
without the TRAILS or TRAILLOOP template variables being evaluated
(for instance, all trail directives are removed from a former trail
that uses a custom pagetemplate that doesn't contain TRAILS), we might
get here without having already called prerender.
2013-01-02 19:19:32 +00:00
Simon McVittie 6e962a2d74 opendiscussion: don't allow editing discussionpage if discussion is disabled 2013-01-02 18:05:33 +00:00
Joey Hess 86519b047e trail: Converted all dependencies to presence dependencies.
smcv please note this introduces another bug, which I've opened
2012-12-27 22:29:51 -04:00
Joey Hess dc05125b0b aggregate: When run with --aggregate, if an aggregation is already running, don't go on and --refresh.
This way, if a previous aggregation job is running, we don't add additional
load doing work that job will do anyway.
2012-12-27 21:25:59 -04:00
Joey Hess 3d6ee9eccd htmlscrubber: Allow the bitcoin URI scheme. 2012-12-22 16:15:38 -04:00
Shlomi Fish 12c9219d67 Fix some warnigns in recent perls.
All existing tests pass.
2012-12-17 22:44:54 +02:00
Joey Hess c29413ba2a openid: Display openid in Preferences page as a comment, so it can be selected in all browsers. 2012-12-04 13:59:19 -04:00
Joey Hess 286026877d filecheck: Fix bug that prevented File::MimeInfo::Magic from ever being used. 2012-11-04 12:02:26 -04:00
Joey Hess 96bfdbf1be really fix diff display to not show both types of diff
12fa9c031f porported to fix this, but failed
2012-10-16 10:59:00 -04:00
Joey Hess b5b3f56703 typo 2012-10-14 20:49:42 -04:00
Joey Hess b1cd1c067f add cgi_overload_message 2012-10-11 11:22:03 -04:00
Joey Hess 6bd8c6732e add cgi_overload_delay tunable
Try to avoid a situation in which so many ikiwiki cgi wrapper programs are
running, all waiting on some long-running thing like a site rebuild, that
it prevents the web server from doing anything else. The current approach
only avoids this problem for GET requests; if multiple cgi's run GETs on a
site at the same time, one will display a "please wait" page for a
configurable number of seconds, which then redirects to retry. To enable
this protection, set cgi_overload_delay to the number of seconds to wait.
This is not enabled by default.
2012-10-09 17:12:04 -04:00
Antoine Beaupré 9aa888cadf osm: indent the generated KML file for better readability
(cherry picked from commit 1636da85d82644d923042c870aaedc5a29754aa6)
2012-08-25 10:45:21 -04:00
Antoine Beaupré a12dc95883 osm: optimization: do not create duplicate styles
(cherry picked from commit 9d550817ca546d1dd30a21cebad6093d1f3bacad)
2012-08-25 10:45:16 -04:00
Joey Hess a3c1768e10 comments: Remove ipv6 address specific code. 2012-08-25 10:43:24 -04:00
Joey Hess 93a12752ac merged anarcat/osm_arbitrary_layers 2012-08-25 10:13:22 -04:00
Antoine Beaupré 636e04a13a make layers an array
this simplifies the code, make the configuration more intuitive, at
the cost of making the labels on the layers automatically generated
and therefore less customizable
2012-08-25 08:53:33 -04:00
Antoine Beaupré 081fd38636 make layers completely customizable 2012-08-25 08:20:30 -04:00
Antoine Beaupré acc4d7d7d6 osm: add optional google maps support
for google maps to work, an API key needs to be added to the configuration
2012-08-25 08:20:30 -04:00
Geneviève Bastien 8fb42f42f4 OSM plugin: new config option to specify the url to fetch maps from 2012-08-25 08:20:30 -04:00
Philippe Gauthier d5b2dfd0e4 Add Document tag to OSM plugin KML output
(cherry picked from commit 519d35368e2f1e7fe1fce577fe7d71ef9bd5c07e)
2012-08-24 23:24:47 -04:00
Genevieve 409c4e48f9 OSM Plugin: Possibility to configure where the OpenLayers.js file is
(cherry picked from commit 6f684cd412e6d93f943c1fa5d8dac91caa138be0)
2012-08-05 22:02:01 -04:00
Philippe Gauthier 60ef4b1965 Fix incorrect URL pointing to the generated waypoint files by calling will_render() before first call to urlto().
Fixes
http://ikiwiki.info/bugs/osm_linkto__40____41___usage_breaks_map_rendering/
(cherry picked from commit 691312225789ff6cd5e3fcc4979c076791d67452)
2012-08-05 21:58:32 -04:00
Joey Hess 25ea99bc22 Split CFLAGS into words when building wrapper. Closes: #682237 2012-07-20 12:56:57 -04:00
Antoine Beaupré c42f992dc9 include manually the toggle js code 2012-07-19 10:32:02 -04:00
Joey Hess 32f3b4de00 Merge remote-tracking branch 'intrigeri/mirrorlist' 2012-06-03 13:15:19 -04:00
Joey Hess 18b0f2737b ensure HTML::Entities is always loaded
(Worked ok in my tests w/o this, but not sure I tested every case,
and this is correct.)
2012-05-16 22:13:23 -04:00
Joey Hess fbfcea89f8 meta: Security fix; add missing sanitization of author and authorurl. Thanks, Raúl Benencia 2012-05-16 19:54:41 -04:00
intrigeri 5b494e1b63 mirrorlist: new mirrorlist_use_cgi boolean setting.
When set to true, let each mirror's ikiwiki CGI find out the correct target page
url themselves.

This resolves the usecase described on
[[todo/mirrorlist_with_per-mirror_usedirs_settings]].

Signed-off-by: intrigeri <intrigeri@boum.org>
2012-04-28 00:18:59 +02:00
Joey Hess ae083783df Merge remote-tracking branch 'smcv/ready/trail' 2012-04-18 15:45:37 -04:00
Joey Hess 30a3efda58 graphviz: Handle self-links. 2012-04-18 15:36:27 -04:00
Joey Hess 169550a926 link: Fix renaming wikilinks that contain embedded urls. 2012-04-18 15:15:11 -04:00
Joey Hess e81e857ba6 add comment subscription checkbox to editpage
Reworded template, which also called the commit message a "comment".
2012-04-13 14:28:02 -04:00
Simon McVittie 3128409c06 trail: delete the right state
At some point I changed the storage of trail members' membership
and forgot to update this use.

(It turns out to be rather difficult to reach this code, possibly even
impossible: it only applies if a member somehow ceases to match the
trail's pagespec without either the trail or the member changing.)
2012-04-09 17:01:23 +01:00
Joey Hess fc5c938b19 Merge remote-tracking branch 'smcv/ready/literal-pagenames' 2012-04-08 16:02:03 -04:00
Joey Hess a434e3ed8d remove unnecessary quoting 2012-04-08 15:56:53 -04:00
Joey Hess b92e8caa4d Merge remote-tracking branch 'smcv/ready/transient-rm' 2012-04-08 15:54:25 -04:00
Joey Hess 4e1806ef7c save whole form state, not just QUERY_STRING, for postsignin
Normally, needsignin is called when there is a QUERY_STRING, not when a
form is posted. However, it's certianly possible, and should be supported,
to make a form that invokes an ikiwiki action that checks needsignin.

I encountered this when posting ?do=rename&page=foo. The form is displayed
without checking needsignin, for complicated reasons. Posting the form
is when the true authentication happens.
2012-04-08 14:14:33 -04:00
Joey Hess bcc2809b96 actually tested rename not started from the edit page 2012-04-08 13:40:01 -04:00
Simon McVittie a7f8a4eb98 Allow deletion of files from the transient underlay 2012-04-07 18:11:05 +01:00
Simon McVittie 5674e7fc12 prune: do not prune beyond an optional base directory, and add a test
Previously, prune("wiki/srcdir/sandbox/test.mdwn") could delete srcdir
or even wiki, if they happened to be empty. This is rarely what you
want: there's usually some base directory (destdir, srcdir, transientdir
or another subdirectory of wikistatedir) beyond which you do not want to
delete.
2012-04-07 17:52:29 +01:00
Simon McVittie 258ee1bc3b trail, inline: treat pagenames as a list of literal names, not links 2012-04-06 17:05:26 +01:00
Simon McVittie 4a4610e66e trail: fix inline documentation 2012-04-06 16:17:44 +01:00
Joey Hess 792e660cb1 improve prototype
src param always needed now
2012-04-05 15:09:13 -04:00
Joey Hess e4cdce4bce rename: Allow rename to be started not from the edit page; return to the renamed page in this case. 2012-04-05 14:48:18 -04:00
Simon McVittie 276ab9a78a Reinstate trail support in inline
This was removed in aaa72a3a80.
2012-04-05 09:43:44 +01:00
Joey Hess 93bda514ba httpauth: When it's the only auth method, avoid a pointless and confusing signin form, and just right to the httpauthurl. 2012-04-04 12:58:36 -04:00
Joey Hess f181b7fa0f uniq list for changed hook
There can be dups when eg, adding a new internal page, apparently.
2012-04-02 13:50:58 -04:00
Joey Hess c885ec66e0 allow users to subscribe to comments w/o registering
Technically, when the user does this, a passwordless account is created
for them. The notify mails include a login url, and once logged in that
way, the user can enter a password to get a regular account (although
one with an annoying username).

This all requires the passwordauth plugin is enabled. A future enhancement
could be to split the passwordless user concept out into a separate plugin.
2012-04-02 13:45:39 -04:00
Joey Hess c16b1e638e support do=tokenauth login for passwordless accounts 2012-04-02 12:29:13 -04:00
Joey Hess f9e96b0c32 passwordauth: Fix url in password recovery email to be absolute.
This got broken when cgiurl began often returning a relative url.
Added a cgiurl_abs for the things that need a guaranteed absolute cgiurl.
2012-04-02 12:24:14 -04:00
Joey Hess 1d1ef20034 add support for a passwordless login token
The plan is to use this for accounts that are created implicitly, as when
a non-logged-in user subscribes to notifyemail. Such an account has no
password, and login can be accomplished by way of a url that is sent to
them in email.

When the user sets a password, the passwordless login token is disabled.
2012-04-02 12:17:07 -04:00
Joey Hess 89df287aaa meta: Support keywords header. Closes: #664780 Thanks, Martin Michlmayr 2012-04-01 14:39:27 -04:00
Joey Hess 5ed773c643 more fixes to subscription prefs 2012-03-28 20:56:22 -04:00
Joey Hess d366a7bbb5 don't force old subscriptions value when posting 2012-03-28 20:45:52 -04:00
Joey Hess 6c297c4097 fix adding first subscription to pagespec 2012-03-28 20:42:37 -04:00
Joey Hess dadc822295 remove misc section 2012-03-28 20:36:25 -04:00
Joey Hess accf79f94a polishing notifyemail 2012-03-28 19:39:08 -04:00
Joey Hess f16de0c4e3 fix hook name 2012-03-28 19:04:44 -04:00
Joey Hess a22be4eef0 finish notifyemail plugin 2012-03-28 18:52:11 -04:00
Joey Hess d68d255268 Added a "changes" hook. Renamed the "change" hook to "rendered", but
the old hook name is called for now for back-compat.
2012-03-28 18:43:07 -04:00
Joey Hess 1916f97472 integrate comments plugin with notifyemail 2012-03-28 18:38:37 -04:00
Joey Hess 4b85a6eca1 add Subscriptions field to prefs 2012-03-28 17:00:54 -04:00
Joey Hess c0e5a0f1aa fix another undef/"" confusion 2012-03-28 16:47:37 -04:00
Joey Hess 723c5b97d3 changemail: New plugin, sends emails about changed pages. 2012-03-28 16:40:10 -04:00
Joey Hess 88e8f0ced9 simplify 2012-03-27 15:52:35 -04:00
Joey Hess 4250d389d3 meta: Export author information in html <meta> tag. Closes: #664779 Thanks, Martin Michlmayr 2012-03-27 15:52:35 -04:00
Joey Hess e7bf599ee0 remove debug message
A file may have no git sha1 if it's in the underlay, or just is not checked
into git. This debug message doesn't add any value and is potentially
confusing.
2012-03-22 13:07:30 -04:00
Joey Hess aaa72a3a80 inline: When the pagenames list includes pages that do not exist, skip them.
bestlink returns '' if no existing page matches a link. This propigated
through inline and other plugins, causing uninitialized value warnings, and
in some cases (when filecheck was enabled) making the whole directive fail.

Skipping the empty results fixes that, but this is papering over another
problem: If the missing page is later added, there is not dependency
information to know that the inline needs to be updated. Perhaps smcv will
fix that later.
2012-03-21 15:48:25 -04:00
Joey Hess 83876a7da6 remove pod documentation
This caused the build system to make unwanted man pages. Using comments
instead.
2012-03-19 14:36:03 -04:00
Joey Hess 0faceb91c0 misc cleanup 2012-03-18 19:33:11 -04:00
Joey Hess 1e0389fffb remove fullscreen option
The cgi shows a fullscreen map, so having this other option to do it seems
redundant, and also layering a fullscreen map over an existing wiki page
doesn't look very good to me (and prevents editing the page etc).
2012-03-18 18:03:48 -04:00
Joey Hess b2471aa729 fix waypoint hrefs 2012-03-18 17:48:57 -04:00