Merge branch 'master' of git://git.ikiwiki.info

master
Javier Rojas 2010-07-19 01:11:28 -05:00
commit 194817b63d
8 changed files with 41 additions and 8 deletions

View File

@ -1118,6 +1118,15 @@ sub urlto ($$;$) {
return beautify_urlpath($link);
}
sub isselflink ($$) {
# Plugins can override this function to support special types
# of selflinks.
my $page=shift;
my $link=shift;
return $page eq $link;
}
sub htmllink ($$$;@) {
my $lpage=shift; # the page doing the linking
my $page=shift; # the page that will contain the link (different for inline)
@ -1143,7 +1152,7 @@ sub htmllink ($$$;@) {
}
return "<span class=\"selflink\">$linktext</span>"
if length $bestlink && $page eq $bestlink &&
if length $bestlink && isselflink($page, $bestlink) &&
! defined $opts{anchor};
if (! $destsources{$bestlink}) {

View File

@ -64,6 +64,8 @@ sub import {
inject(name => "IkiWiki::cgiurl", call => \&mycgiurl);
$origsubs{'rootpage'}=\&IkiWiki::rootpage;
inject(name => "IkiWiki::rootpage", call => \&myrootpage);
$origsubs{'isselflink'}=\&IkiWiki::isselflink;
inject(name => "IkiWiki::isselflink", call => \&myisselflink);
}
}
@ -675,6 +677,17 @@ sub myrootpage (@) {
return $rootpage;
}
sub myisselflink ($$) {
my $page=shift;
my $link=shift;
return 1 if $origsubs{'isselflink'}->($page, $link);
if (istranslation($page)) {
return $origsubs{'isselflink'}->(masterpage($page), $link);
}
return;
}
# ,----
# | Blackboxes for private data
# `----

1
debian/changelog vendored
View File

@ -21,6 +21,7 @@ ikiwiki (3.20100705) UNRELEASED; urgency=low
* Made much more robust in cases where multiple source files produce
conflicting files/directories in the destdir.
* Updated French program translation from Philippe Batailler. Closes: #589423
* po: Fix selflink display on tranlsated pages. (intrigeri)
-- Joey Hess <joeyh@debian.org> Mon, 05 Jul 2010 13:59:42 -0400

View File

@ -1,4 +1,4 @@
Lighttpd apparently sets REDIRECT_STATUS=200 for the server.error-handler-404 page. This breaks the 404 plugin which checks this variable for 404 before processing the URI. It also doesn't seem to set REDIRECT_URL.
Lighttpd apparently sets REDIRECT_STATUS=200 for the server.error-handler-404 page. This breaks the [[plugins/404]] plugin which checks this variable for 404 before processing the URI. It also doesn't seem to set REDIRECT_URL.
I was able to fix my server to check the REQUEST_URI for ikiwiki.cgi and to continue processing if it was not found, passing $ENV{SEVER_NAME} . $ENV{REQUEST_URI} as the first parameter to cgi_page_from_404. However, my perl is terrible and I just made it work rather than figuring out exactly what to do to get it to work on both lighttpd and apache.

View File

@ -13,8 +13,4 @@ file:
(The path here needs to be whatever the path is to the ikiwiki.cgi from
the root of your web server.)
Or put something like this in the wiki's Lighttpd (>=1.4.17) configuration file:
server.error-handler-404 = "/ikiwiki.cgi"

View File

@ -297,6 +297,10 @@ to an array to support this. (If twere done, twere best done quickly.)
>>> Joey, which of these solutions do you prefer? Or another one?
>>> I tend to prefer the last one. --[[intrigeri]]
>>>> I prefer the pipe separator, I think. I'm concerned that there is
>>>> no way to really sanely represent complex data structures in web
>>>> setup. --[[Joey]]
Pagespecs
---------
@ -351,6 +355,16 @@ update. --[[Joey]]
> * The ENCODING\n part is due to an inconsistency in po4a, which
> I've just send a patch for. --[[intrigeri]]
New pages not translatable
--------------------------
Today I added a new English page to l10n.ikiwiki.info. When I saved,
the page did not have the translation links at the top. I waited until
the po plugin had, in the background, created the po files, and refreshed;
still did not see the translation links. Only when I touched the page
source and refreshed did it finally add the translation links.
I can reproduce this bug in a test site. --[[Joey]]
Ugly messages with empty files
------------------------------

View File

@ -5,7 +5,7 @@ isn't. --[[intrigeri]]
Fixed in my po branch. --[[intrigeri]]
[[!tag patch]]
[[!tag patch done]]
> bump?

View File

@ -1,3 +1,3 @@
email: weakish@gmail.com
openid: <http://weakish.pigro.net>
website: <http://weakish.github.com>