return 1;
}
-sub loadplugin ($) {
+sub loadplugin ($;$) {
my $plugin=shift;
+ my $force=shift;
- return if grep { $_ eq $plugin} @{$config{disable_plugins}};
+ return if ! $force && grep { $_ eq $plugin} @{$config{disable_plugins}};
foreach my $dir (defined $config{libdir} ? possibly_foolish_untaint($config{libdir}) : undef,
"$installdir/lib/ikiwiki") {
$hooks{rcs}{rcs_prepedit}{call}->(@_);
}
-sub rcs_commit ($$$;$$) {
+sub rcs_commit (@) {
$hooks{rcs}{rcs_commit}{call}->(@_);
}
-sub rcs_commit_staged ($$$) {
+sub rcs_commit_staged (@) {
$hooks{rcs}{rcs_commit_staged}{call}->(@_);
}
foreach my $b (@{$config{banned_users}}) {
if (pagespec_match("", $b,
- ip => $ENV{REMOTE_ADDR},
+ ip => $session->remote_addr(),
name => defined $name ? $name : "",
)) {
$banned=1;
$config{allowed_attachments},
file => $file,
user => $session->param("name"),
- ip => $ENV{REMOTE_ADDR},
+ ip => $session->remote_addr(),
);
}
}
}
+ $filename=IkiWiki::basename($filename);
+ $filename=~s/.*\\+(.+)/$1/; # hello, windows
+
$filename=linkpage(IkiWiki::possibly_foolish_untaint(
attachment_location($form->field('page')).
- IkiWiki::basename($filename)));
+ $filename));
if (IkiWiki::file_pruned($filename)) {
error(gettext("bad attachment filename"));
}
if ($config{rcs}) {
IkiWiki::rcs_add($filename);
IkiWiki::disable_commit_hook();
- IkiWiki::rcs_commit($filename, gettext("attachment upload"),
- IkiWiki::rcs_prepedit($filename),
- $session->param("name"), $ENV{REMOTE_ADDR});
+ IkiWiki::rcs_commit(
+ file => $filename,
+ message => gettext("attachment upload"),
+ token => IkiWiki::rcs_prepedit($filename),
+ session => $session,
+ );
IkiWiki::enable_commit_hook();
IkiWiki::rcs_update();
}
foreach my $f ($q->param("attachment_select")) {
$f=Encode::decode_utf8($f);
$f=~s/^$page\///;
- $add.="[[$f]]\n";
+ if (IkiWiki::isinlinableimage($f) &&
+ UNIVERSAL::can("IkiWiki::Plugin::img", "import")) {
+ $add.='[[!img '.$f.' align="right" size="" alt=""]]';
+ }
+ else {
+ $add.="[[$f]]";
+ }
+ $add.="\n";
}
$form->field(name => 'editcontent',
value => $form->field('editcontent')."\n\n".$add,
my @ret;
foreach my $f (values %pagesources) {
if (! defined pagetype($f) &&
- $f=~m/^\Q$loc\E[^\/]+$/ &&
- -e "$config{srcdir}/$f") {
+ $f=~m/^\Q$loc\E[^\/]+$/) {
push @ret, {
"field-select" => '<input type="checkbox" name="attachment_select" value="'.$f.'" />',
link => htmllink($page, $page, $f, noimageinline => 1),
sub refresh () {
eval q{use File::Find};
error($@) if $@;
+ eval q{use Cwd};
+ error($@) if $@;
+ my $origdir=getcwd();
my (%pages, %dirs);
foreach my $dir ($config{srcdir}, @{$config{underlaydirs}}, $config{underlaydir}) {
- require File::Spec;
- $dir=File::Spec->canonpath($dir);
+ chdir($dir) || next;
find({
no_chdir => 1,
wanted => sub {
- my $file=File::Spec->canonpath(decode_utf8($_));
- return if $file eq $dir;
- $file=~s/^\Q$dir\E\/?//;
+ my $file=decode_utf8($_);
+ $file=~s/^\.\/?//;
return unless length $file;
if (IkiWiki::file_pruned($file)) {
$File::Find::prune=1;
}
}
}
- }, $dir);
+ }, '.');
+
+ chdir($origdir) || die "chdir $origdir: $!";
}
my %deleted;
}
if ($config{rcs}) {
IkiWiki::rcs_commit_staged(
- gettext("automatic index generation"),
- undef, undef);
+ message => gettext("automatic index generation"),
+ );
IkiWiki::enable_commit_hook();
}
}
sub checkcontent (@) {
my %params=@_;
+ my $session=$params{session};
if (exists $config{blogspam_pagespec}) {
return undef
push @options, "exclude=stopwords";
my %req=(
- ip => $ENV{REMOTE_ADDR},
+ ip => $session->remote_addr(),
comment => defined $params{diff} ? $params{diff} : $params{content},
subject => defined $params{subject} ? $params{subject} : "",
name => defined $params{author} ? $params{author} : "",
return "";
}
-sub bzr_author ($$) {
- my ($user, $ipaddr) = @_;
+sub bzr_author ($) {
+ my $session=shift;
+
+ return unless defined $session;
+
+ my $user=$session->param("name");
+ my $ipaddr=$session->remote_addr();
if (defined $user) {
return IkiWiki::possibly_foolish_untaint($user);
}
}
-sub rcs_commit ($$$;$$) {
- my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
+sub rcs_commit (@) {
+ my %params=@_;
- $user = bzr_author($user, $ipaddr);
+ my $user=bzr_author($params{session});
- $message = IkiWiki::possibly_foolish_untaint($message);
- if (! length $message) {
- $message = "no message given";
+ $params{message} = IkiWiki::possibly_foolish_untaint($params{message});
+ if (! length $params{message}) {
+ $params{message} = "no message given";
}
- my @cmdline = ("bzr", "commit", "--quiet", "-m", $message, "--author", $user,
- $config{srcdir}."/".$file);
+ my @cmdline = ("bzr", "commit", "--quiet", "-m", $params{message},
+ (defined $user ? ("--author", $user) : ()),
+ $config{srcdir}."/".$params{file});
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
}
return undef; # success
}
-sub rcs_commit_staged ($$$) {
- # Commits all staged changes. Changes can be staged using rcs_add,
- # rcs_remove, and rcs_rename.
- my ($message, $user, $ipaddr)=@_;
+sub rcs_commit_staged (@) {
+ my %params=@_;
- $user = bzr_author($user, $ipaddr);
+ my $user=bzr_author($params{session});
- $message = IkiWiki::possibly_foolish_untaint($message);
- if (! length $message) {
- $message = "no message given";
+ $params{message} = IkiWiki::possibly_foolish_untaint($params{message});
+ if (! length $params{message}) {
+ $params{message} = "no message given";
}
- my @cmdline = ("bzr", "commit", "--quiet", "-m", $message, "--author", $user,
+ my @cmdline = ("bzr", "commit", "--quiet", "-m", $params{message},
+ (defined $user ? ("--author", $user) : ()),
$config{srcdir});
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
}
sub extract_timestamp (@) {
- # XXX filename passes through the shell here, should try to avoid
- # that just in case
- open (my $out, "@_ |");
+ open (my $out, "-|", @_);
my @log = bzr_log($out);
if (length @log < 1) {
},
archive_pagespec => {
type => "pagespec",
- example => "posts/* and !*/Discussion",
+ example => "page(posts/*) and !*/Discussion",
description => "PageSpec of pages to include in the archives; used by ikiwiki-calendar command",
link => 'ikiwiki/PageSpec',
safe => 1,
$username =~ s/"/"/g;
$content .= " username=\"$username\"\n";
}
- elsif (defined $ENV{REMOTE_ADDR}) {
- my $ip = $ENV{REMOTE_ADDR};
+ elsif (defined $session->remote_addr()) {
+ my $ip = $session->remote_addr();
if ($ip =~ m/^([.0-9]+)$/) {
$content .= " ip=\"$1\"\n";
}
IkiWiki::rcs_add($file);
IkiWiki::disable_commit_hook();
- $conflict = IkiWiki::rcs_commit_staged($message,
- $session->param('name'), $ENV{REMOTE_ADDR});
+ $conflict = IkiWiki::rcs_commit_staged(
+ message => $message,
+ session => $session,
+ );
IkiWiki::enable_commit_hook();
IkiWiki::rcs_update();
}
}
else {
IkiWiki::showform ($form, \@buttons, $session, $cgi,
- forcebaseurl => $baseurl);
+ forcebaseurl => $baseurl, page => $page);
}
exit;
if ($config{rcs} and $config{comments_commit}) {
my $message = gettext("Comment moderation");
IkiWiki::disable_commit_hook();
- $conflict=IkiWiki::rcs_commit_staged($message,
- $session->param('name'), $ENV{REMOTE_ADDR});
+ $conflict=IkiWiki::rcs_commit_staged(
+ message => $message,
+ session => $session,
+ );
IkiWiki::enable_commit_hook();
IkiWiki::rcs_update();
}
eval q{use File::Find};
error($@) if $@;
+ eval q{use Cwd};
+ error($@) if $@;
+ my $origdir=getcwd();
my $find_comments=sub {
my $dir=shift;
my $extension=shift;
return unless -d $dir;
+
+ chdir($dir) || die "chdir $dir: $!";
+
find({
no_chdir => 1,
wanted => sub {
my $file=decode_utf8($_);
- $file=~s/^\Q$dir\E\/?//;
+ $file=~s/^\.\///;
return if ! length $file || IkiWiki::file_pruned($file)
|| -l $_ || -d _ || $file !~ /\Q$extension\E$/;
my ($f) = $file =~ /$config{wiki_file_regexp}/; # untaint
push @ret, [$f, $dir, $ctime];
}
}
- }, $dir);
+ }, ".");
+
+ chdir($origdir) || die "chdir $origdir: $!";
};
$find_comments->($config{srcdir}, "._comment_pending");
return defined $rev ? $rev : "";
}
-sub rcs_commit ($$$;$$) {
+sub commitmessage (@) {
+ my %params=@_;
+
+ if (defined $params{session}) {
+ if (defined $params{session}->param("name")) {
+ return "web commit by ".
+ $params{session}->param("name").
+ (length $params{message} ? ": $params{message}" : "");
+ }
+ elsif (defined $params{session}->remote_addr()) {
+ return "web commit from ".
+ $params{session}->remote_addr().
+ (length $params{message} ? ": $params{message}" : "");
+ }
+ }
+ return $params{message};
+}
+
+sub rcs_commit (@) {
# Tries to commit the page; returns undef on _success_ and
# a version of the page with the rcs's conflict markers on failure.
# The file is relative to the srcdir.
- my $file=shift;
- my $message=shift;
- my $rcstoken=shift;
- my $user=shift;
- my $ipaddr=shift;
+ my %params=@_;
return unless cvs_is_controlling;
- if (defined $user) {
- $message="web commit by $user".(length $message ? ": $message" : "");
- }
- elsif (defined $ipaddr) {
- $message="web commit from $ipaddr".(length $message ? ": $message" : "");
- }
-
# Check to see if the page has been changed by someone
# else since rcs_prepedit was called.
- my ($oldrev)=$rcstoken=~/^([0-9]+)$/; # untaint
- my $rev=cvs_info("Repository revision", "$config{srcdir}/$file");
+ my ($oldrev)=$params{token}=~/^([0-9]+)$/; # untaint
+ my $rev=cvs_info("Repository revision", "$config{srcdir}/$params{file}");
if (defined $rev && defined $oldrev && $rev != $oldrev) {
# Merge their changes into the file that we've
# changed.
- cvs_runcvs('update', $file) ||
+ cvs_runcvs('update', $params{file}) ||
warn("cvs merge from $oldrev to $rev failed\n");
}
if (! cvs_runcvs('commit', '-m',
- IkiWiki::possibly_foolish_untaint $message)) {
- my $conflict=readfile("$config{srcdir}/$file");
- cvs_runcvs('update', '-C', $file) ||
+ IkiWiki::possibly_foolish_untaint(commitmessage(%params)))) {
+ my $conflict=readfile("$config{srcdir}/$params{file}");
+ cvs_runcvs('update', '-C', $params{file}) ||
warn("cvs revert failed\n");
return $conflict;
}
return undef # success
}
-sub rcs_commit_staged ($$$) {
+sub rcs_commit_staged (@) {
# Commits all staged changes. Changes can be staged using rcs_add,
# rcs_remove, and rcs_rename.
- my ($message, $user, $ipaddr)=@_;
-
- if (defined $user) {
- $message="web commit by $user".(length $message ? ": $message" : "");
- }
- elsif (defined $ipaddr) {
- $message="web commit from $ipaddr".(length $message ? ": $message" : "");
- }
+ my %params=@_;
if (! cvs_runcvs('commit', '-m',
- IkiWiki::possibly_foolish_untaint $message)) {
+ IkiWiki::possibly_foolish_untaint(commitmessage(%params)))) {
warn "cvs staged commit failed\n";
return 1; # failure
}
rcs_remove($src);
}
-sub rcs_recentchanges($) {
+sub rcs_recentchanges ($) {
my $num = shift;
my @ret;
return $rev;
}
-sub rcs_commit ($$$;$$) {
+sub commitauthor (@) {
+ my %params=@_;
+
+ my $author="anon\@web";
+ if (defined $params{session}) {
+ if (defined $params{session}->param("name")) {
+ return $params{session}->param("name").'@web';
+ }
+ elsif (defined $params{session}->remote_addr()) {
+ return $params{session}->remote_addr().'@web';
+ }
+ }
+ return 'anon@web';
+}
+
+sub rcs_commit (@) {
# Commit the page. Returns 'undef' on success and a version of the page
# with conflict markers on failure.
+ my %params=@_;
- my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
+ my ($file, $message, $token) =
+ ($params{file}, $params{message}, $params{token});
# Compute if the "revision" of $file changed.
- my $changed = darcs_rev($file) ne $rcstoken;
+ my $changed = darcs_rev($file) ne $token;
# Yes, the following is a bit convoluted.
if ($changed) {
rename("$config{srcdir}/$file", "$config{srcdir}/$file.save") or
error("failed to rename $file to $file.save: $!");
- # Roll the repository back to $rcstoken.
+ # Roll the repository back to $token.
# TODO. Can we be sure that no changes are lost? I think that
# we can, if we make sure that the 'darcs push' below will always
# TODO: 'yes | ...' needed? Doesn't seem so.
silentsystem('darcs', "revert", "--repodir", $config{srcdir}, "--all") == 0 ||
error("'darcs revert' failed");
- # Remove all patches starting at $rcstoken.
+ # Remove all patches starting at $token.
my $child = open(DARCS_OBLITERATE, "|-");
if (! $child) {
open(STDOUT, ">/dev/null");
exec('darcs', "obliterate", "--repodir", $config{srcdir},
- "--match", "hash " . $rcstoken) and
+ "--match", "hash " . $token) and
error("'darcs obliterate' failed");
}
1 while print DARCS_OBLITERATE "y";
close(DARCS_OBLITERATE);
- # Restore the $rcstoken one.
+ # Restore the $token one.
silentsystem('darcs', "pull", "--quiet", "--repodir", $config{srcdir},
- "--match", "hash " . $rcstoken, "--all") == 0 ||
+ "--match", "hash " . $token, "--all") == 0 ||
error("'darcs pull' failed");
- # We're back at $rcstoken. Re-install the modified file.
+ # We're back at $token. Re-install the modified file.
rename("$config{srcdir}/$file.save", "$config{srcdir}/$file") or
error("failed to rename $file.save to $file: $!");
}
# Record the changes.
- my $author;
- if (defined $user) {
- $author = "$user\@web";
- }
- elsif (defined $ipaddr) {
- $author = "$ipaddr\@web";
- }
- else {
- $author = "anon\@web";
- }
+ my $author=commitauthor(%params);
if (!defined $message || !length($message)) {
$message = "empty message";
}
# If this updating yields any conflicts, we'll record them now to resolve
# them. If nothing is recorded, there are no conflicts.
- $rcstoken = darcs_rev($file);
+ $token = darcs_rev($file);
# TODO: Use only the first line here, i.e. only the patch name?
writefile("$file.log", $config{srcdir}, 'resolve conflicts: ' . $message);
silentsystem('darcs', 'record', '--repodir', $config{srcdir}, '--all',
'-m', 'resolve conflicts: ' . $message, '--author', $author, $file) == 0 ||
error("'darcs record' failed");
- my $conflicts = darcs_rev($file) ne $rcstoken;
+ my $conflicts = darcs_rev($file) ne $token;
unlink("$config{srcdir}/$file.log") or
error("failed to remove '$file.log'");
}
}
-sub rcs_commit_staged ($$$) {
- my ($message, $user, $ipaddr) = @_;
+sub rcs_commit_staged (@) {
+ my %params=@_;
- my $author;
- if (defined $user) {
- $author = "$user\@web";
- }
- elsif (defined $ipaddr) {
- $author = "$ipaddr\@web";
- }
- else {
- $author = "anon\@web";
- }
- if (!defined $message || !length($message)) {
- $message = "empty message";
+ my $author=commitauthor(%params);
+ if (!defined $params{message} || !length($params{message})) {
+ $params{message} = "empty message";
}
- silentsystem('darcs', "record", "--repodir", $config{srcdir}, "-a", "-A", $author,
- "-m", $message) == 0 || error("'darcs record' failed");
+ silentsystem('darcs', "record", "--repodir", $config{srcdir},
+ "-a", "-A", $author,
+ "-m", $params{message},
+ ) == 0 || error("'darcs record' failed");
# Push the changes to the main repository.
silentsystem('darcs', 'push', '--quiet', '--repodir', $config{srcdir}, '--all') == 0 ||
decode_cgi_utf8($q);
- my @fields=qw(do rcsinfo subpage from page type editcontent comments);
+ my @fields=qw(do rcsinfo subpage from page type editcontent editmessage);
my @buttons=("Save Page", "Preview", "Cancel");
eval q{use CGI::FormBuilder};
error($@) if $@;
$form->field(name => "subpage", type => 'hidden');
$form->field(name => "page", value => $page, force => 1);
$form->field(name => "type", value => $type, force => 1);
- $form->field(name => "comments", type => "text", size => 80);
+ $form->field(name => "editmessage", type => "text", size => 80);
$form->field(name => "editcontent", type => "textarea", rows => 20,
cols => 80);
$form->tmpl_param("can_commit", $config{rcs});
}
showform($form, \@buttons, $session, $q,
- forcebaseurl => $baseurl,
- ($previewing ? (page => $page) : ()),
- );
+ forcebaseurl => $baseurl, page => $page);
}
else {
# save page
$form->field(name => "type", type => 'hidden');
$form->title(sprintf(gettext("editing %s"), $page));
showform($form, \@buttons, $session, $q,
- forcebaseurl => $baseurl);
+ forcebaseurl => $baseurl, page => $page);
exit;
}
elsif ($form->field("do") eq "create" && $exists) {
"\n\n\n".$form->field("editcontent"),
force => 1);
showform($form, \@buttons, $session, $q,
- forcebaseurl => $baseurl);
+ forcebaseurl => $baseurl, page => $page);
exit;
}
my $message="";
- if (defined $form->field('comments') &&
- length $form->field('comments')) {
- $message=$form->field('comments');
+ if (defined $form->field('editmessage') &&
+ length $form->field('editmessage')) {
+ $message=$form->field('editmessage');
}
my $content=$form->field('editcontent');
$form->field(name => "type", type => 'hidden');
$form->title(sprintf(gettext("editing %s"), $page));
showform($form, \@buttons, $session, $q,
- forcebaseurl => $baseurl);
+ forcebaseurl => $baseurl, page => $page);
exit;
}
# signaling to it that it should not try to
# do anything.
disable_commit_hook();
- $conflict=rcs_commit($file, $message,
- $form->field("rcsinfo"),
- $session->param("name"), $ENV{REMOTE_ADDR});
+ $conflict=rcs_commit(
+ file => $file,
+ message => $message,
+ token => $form->field("rcsinfo"),
+ session => $session,
+ );
enable_commit_hook();
rcs_update();
}
$form->field(name => "type", type => 'hidden');
$form->title(sprintf(gettext("editing %s"), $page));
showform($form, \@buttons, $session, $q,
- forcebaseurl => $baseurl);
+ forcebaseurl => $baseurl, page => $page);
}
else {
# The trailing question mark tries to avoid broken
}
my $link=linkpage($params{template});
+ add_depends($params{page}, $link, deptype("presence"));
my $bestlink=bestlink($params{page}, $link);
+ if (! length $bestlink) {
+ add_depends($params{page}, "templates/$link", deptype("presence"));
+ $link="/templates/".$link;
+ $bestlink=bestlink($params{page}, $link);
+ }
$pagestate{$params{page}}{edittemplate}{$params{match}}=$bestlink;
- return "" if ($params{silent} && IkiWiki::yesno($params{silent}));
- add_depends($params{page}, $link, deptype("presence"));
+ return "" if ($params{silent} && IkiWiki::yesno($params{silent})) &&
+ length $bestlink;
return sprintf(gettext("edittemplate %s registered for %s"),
htmllink($params{page}, $params{destpage}, $link),
$params{match});
return $conflict;
}
-sub parse_diff_tree ($@) {
+{
+my $prefix;
+sub decode_git_file ($) {
+ my $file=shift;
+
+ # git does not output utf-8 filenames, but instead
+ # double-quotes them with the utf-8 characters
+ # escaped as \nnn\nnn.
+ if ($file =~ m/^"(.*)"$/) {
+ ($file=$1) =~ s/\\([0-7]{1,3})/chr(oct($1))/eg;
+ }
+
+ # strip prefix if in a subdir
+ if (! defined $prefix) {
+ ($prefix) = run_or_die('git', 'rev-parse', '--show-prefix');
+ if (! defined $prefix) {
+ $prefix="";
+ }
+ }
+ $file =~ s/^\Q$prefix\E//;
+
+ return decode("utf8", $file);
+}
+}
+
+sub parse_diff_tree ($) {
# Parse the raw diff tree chunk and return the info hash.
# See git-diff-tree(1) for the syntax.
-
- my ($prefix, $dt_ref) = @_;
+ my $dt_ref = shift;
# End of stream?
return if !defined @{ $dt_ref } ||
$ci{ "${who}_epoch" } = $epoch;
$ci{ "${who}_tz" } = $tz;
- if ($name =~ m/^[^<]+\s+<([^@>]+)/) {
- $ci{"${who}_username"} = $1;
+ if ($name =~ m/^([^<]+)\s+<([^@>]+)/) {
+ $ci{"${who}_name"} = $1;
+ $ci{"${who}_username"} = $2;
}
elsif ($name =~ m/^([^<]+)\s+<>$/) {
$ci{"${who}_username"} = $1;
my $sha1_to = shift(@tmp);
my $status = shift(@tmp);
- # git does not output utf-8 filenames, but instead
- # double-quotes them with the utf-8 characters
- # escaped as \nnn\nnn.
- if ($file =~ m/^"(.*)"$/) {
- ($file=$1) =~ s/\\([0-7]{1,3})/chr(oct($1))/eg;
- }
- $file =~ s/^\Q$prefix\E//;
if (length $file) {
push @{ $ci{'details'} }, {
- 'file' => decode("utf8", $file),
+ 'file' => decode_git_file($file),
'sha1_from' => $sha1_from[0],
'sha1_to' => $sha1_to,
'mode_from' => $mode_from[0],
my @raw_lines = run_or_die('git', 'log', @opts,
'--pretty=raw', '--raw', '--abbrev=40', '--always', '-c',
'-r', $sha1, '--', '.');
- my ($prefix) = run_or_die('git', 'rev-parse', '--show-prefix');
my @ci;
- while (my $parsed = parse_diff_tree(($prefix or ""), \@raw_lines)) {
+ while (my $parsed = parse_diff_tree(\@raw_lines)) {
push @ci, $parsed;
}
return git_sha1($file);
}
-sub rcs_commit ($$$;$$) {
+sub rcs_commit (@) {
# Try to commit the page; returns undef on _success_ and
# a version of the page with the rcs's conflict markers on
# failure.
-
- my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
+ my %params=@_;
# Check to see if the page has been changed by someone else since
# rcs_prepedit was called.
- my $cur = git_sha1($file);
- my ($prev) = $rcstoken =~ /^($sha1_pattern)$/; # untaint
+ my $cur = git_sha1($params{file});
+ my ($prev) = $params{token} =~ /^($sha1_pattern)$/; # untaint
if (defined $cur && defined $prev && $cur ne $prev) {
- my $conflict = merge_past($prev, $file, $dummy_commit_msg);
+ my $conflict = merge_past($prev, $params{file}, $dummy_commit_msg);
return $conflict if defined $conflict;
}
- rcs_add($file);
- return rcs_commit_staged($message, $user, $ipaddr);
+ rcs_add($params{file});
+ return rcs_commit_staged(
+ message => $params{message},
+ session => $params{session},
+ );
}
-sub rcs_commit_staged ($$$) {
+sub rcs_commit_staged (@) {
# Commits all staged changes. Changes can be staged using rcs_add,
# rcs_remove, and rcs_rename.
- my ($message, $user, $ipaddr)=@_;
-
- # Set the commit author and email to the web committer.
+ my %params=@_;
+
my %env=%ENV;
- if (defined $user || defined $ipaddr) {
- my $u=encode_utf8(defined $user ? $user : $ipaddr);
- # MITLOGIN This algorithm could be improved
- $ENV{GIT_AUTHOR_NAME}=IkiWiki::userinfo_get($u, "realname");
- $ENV{GIT_AUTHOR_EMAIL}="$u\@mit.edu";
+
+ if (defined $params{session}) {
+ # Set the commit author and email based on web session info.
+ my $u;
+ if (defined $params{session}->param("name")) {
+ $u=$params{session}->param("name");
+ }
+ elsif (defined $params{session}->remote_addr()) {
+ $u=$params{session}->remote_addr();
+ }
+ if (defined $u) {
+ $u=encode_utf8($u);
+ # MITLOGIN This algorithm could be improved
+ $ENV{GIT_AUTHOR_NAME}=IkiWiki::userinfo_get($u, "realname");
+ $ENV{GIT_AUTHOR_EMAIL}="$u\@mit.edu";
+ }
}
- $message = IkiWiki::possibly_foolish_untaint($message);
+ $params{message} = IkiWiki::possibly_foolish_untaint($params{message});
my @opts;
- if ($message !~ /\S/) {
+ if ($params{message} !~ /\S/) {
# Force git to allow empty commit messages.
# (If this version of git supports it.)
my ($version)=`git --version` =~ /git version (.*)/;
push @opts, '--cleanup=verbatim';
}
else {
- $message.=".";
+ $params{message}.=".";
}
}
push @opts, '-q';
# git commit returns non-zero if file has not been really changed.
# so we should ignore its exit status (hence run_or_non).
- if (run_or_non('git', 'commit', @opts, '-m', $message)) {
+ if (run_or_non('git', 'commit', @opts, '-m', $params{message})) {
if (length $config{gitorigin_branch}) {
run_or_cry('git', 'push', $config{gitorigin_branch});
}
push @messages, { line => $line };
}
- my $user=$ci->{'author_username'};
+ my $user=$ci->{'author_name'};
+ my $usershort=$ci->{'author_username'};
my $web_commit = ($ci->{'author'} =~ /\@web>/);
-
+
+ if ($usershort =~ /:\/\//) {
+ $usershort=undef; # url; not really short
+ }
+
# compatability code for old web commit messages
if (! $web_commit &&
defined $messages[0] &&
push @rets, {
rev => $sha1,
user => $user,
+ usershort => $usershort,
committype => $web_commit ? "web" : "git",
when => $when,
message => [@messages],
$date=undef;
}
else {
- if (! $time_cache{$line}) {
- $time_cache{$line}[0]=$date; # mtime
+ my $f=decode_git_file($line);
+
+ if (! $time_cache{$f}) {
+ $time_cache{$f}[0]=$date; # mtime
}
- $time_cache{$line}[1]=$date; # ctime
+ $time_cache{$f}[1]=$date; # ctime
}
}
}
}
}
- if (! exists $params{size}) {
+ if (! exists $params{size} || ! length $params{size}) {
$params{size}='full';
}
$imgurl="$config{url}/$imglink";
}
+ my $attrs='';
+ foreach my $attr (qw{alt title class id hspace vspace}) {
+ if (exists $params{$attr}) {
+ $attrs.=" $attr=\"$params{$attr}\"";
+ }
+ }
+
my $imgtag='<img src="'.$imgurl.
'" width="'.$dwidth.
'" height="'.$dheight.'"'.
- (exists $params{alt} ? ' alt="'.$params{alt}.'"' : '').
- (exists $params{title} ? ' title="'.$params{title}.'"' : '').
- (exists $params{class} ? ' class="'.$params{class}.'"' : '').
+ $attrs.
(exists $params{align} && ! exists $params{caption} ? ' align="'.$params{align}.'"' : '').
- (exists $params{id} ? ' id="'.$params{id}.'"' : '').
' />';
my $link;
my $link_regexp;
+my $email_regexp = qr/^.+@.+$/;
+my $url_regexp = qr/^(?:[^:]+:\/\/|mailto:).*/i;
+
sub import {
hook(type => "getsetup", id => "link", call => \&getsetup);
hook(type => "checkconfig", id => "link", call => \&checkconfig);
)? # optional
\]\] # end of link
- }x,
+ }x;
}
}
+sub is_externallink ($$;$$) {
+ my $page = shift;
+ my $url = shift;
+ my $anchor = shift;
+ my $force = shift;
+
+ if (defined $anchor) {
+ $url.="#".$anchor;
+ }
+
+ if (! $force && $url =~ /$email_regexp/) {
+ # url looks like an email address, so we assume it
+ # is supposed to be an external link if there is no
+ # page with that name.
+ return (! (bestlink($page, linkpage($url))))
+ }
+
+ return ($url =~ /$url_regexp/)
+}
+
+sub externallink ($$;$) {
+ my $url = shift;
+ my $anchor = shift;
+ my $pagetitle = shift;
+
+ if (defined $anchor) {
+ $url.="#".$anchor;
+ }
+
+ # build pagetitle
+ if (! $pagetitle) {
+ $pagetitle = $url;
+ # use only the email address as title for mailto: urls
+ if ($pagetitle =~ /^mailto:.*/) {
+ $pagetitle =~ s/^mailto:([^?]+).*/$1/;
+ }
+ }
+
+ if ($url !~ /$url_regexp/) {
+ # handle email addresses (without mailto:)
+ $url = "mailto:" . $url;
+ }
+
+ return "<a href=\"$url\">$pagetitle</a>";
+}
+
sub linkify (@) {
my %params=@_;
my $page=$params{page};
$params{content} =~ s{(\\?)$link_regexp}{
defined $2
? ( $1
- ? "[[$2|$3".($4 ? "#$4" : "")."]]"
- : htmllink($page, $destpage, linkpage($3),
- anchor => $4, linktext => pagetitle($2)))
+ ? "[[$2|$3".(defined $4 ? "#$4" : "")."]]"
+ : is_externallink($page, $3, $4)
+ ? externallink($3, $4, $2)
+ : htmllink($page, $destpage, linkpage($3),
+ anchor => $4, linktext => pagetitle($2)))
: ( $1
- ? "[[$3".($4 ? "#$4" : "")."]]"
- : htmllink($page, $destpage, linkpage($3),
- anchor => $4))
+ ? "[[$3".(defined $4 ? "#$4" : "")."]]"
+ : is_externallink($page, $3, $4)
+ ? externallink($3, $4)
+ : htmllink($page, $destpage, linkpage($3),
+ anchor => $4))
}eg;
return $params{content};
my $content=$params{content};
while ($content =~ /(?<!\\)$link_regexp/g) {
- add_link($page, linkpage($2));
+ if (! is_externallink($page, $2, $3, 1)) {
+ add_link($page, linkpage($2));
+ }
}
}
my $new=$params{newpage};
$params{content} =~ s{(?<!\\)$link_regexp}{
- my $linktext=$2;
- my $link=$linktext;
- if (bestlink($page, linkpage($linktext)) eq $old) {
- $link=pagetitle($new, 1);
- $link=~s/ /_/g;
- if ($linktext =~ m/.*\/*?[A-Z]/) {
- # preserve leading cap of last component
- my @bits=split("/", $link);
- $link=join("/", @bits[0..$#bits-1], ucfirst($bits[$#bits]));
- }
- if (index($linktext, "/") == 0) {
- # absolute link
- $link="/$link";
+ if (! is_externallink($page, $2, $3)) {
+ my $linktext=$2;
+ my $link=$linktext;
+ if (bestlink($page, linkpage($linktext)) eq $old) {
+ $link=pagetitle($new, 1);
+ $link=~s/ /_/g;
+ if ($linktext =~ m/.*\/*?[A-Z]/) {
+ # preserve leading cap of last component
+ my @bits=split("/", $link);
+ $link=join("/", @bits[0..$#bits-1], ucfirst($bits[$#bits]));
+ }
+ if (index($linktext, "/") == 0) {
+ # absolute link
+ $link="/$link";
+ }
}
+ defined $1
+ ? ( "[[$1|$link".($3 ? "#$3" : "")."]]" )
+ : ( "[[$link". ($3 ? "#$3" : "")."]]" )
}
- defined $1
- ? ( "[[$1|$link".($3 ? "#$3" : "")."]]" )
- : ( "[[$link". ($3 ? "#$3" : "")."]]" )
}eg;
return $params{content};
if (defined $config{locked_pages} && length $config{locked_pages} &&
pagespec_match($page, $config{locked_pages},
user => $session->param("name"),
- ip => $ENV{REMOTE_ADDR},
+ ip => $session->remote_addr(),
)) {
if ((! defined $user ||
! IkiWiki::userinfo_get($session->param("name"), "regdate")) &&
return "";
}
-sub rcs_commit ($$$;$$) {
- my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
+sub rcs_commit (@) {
+ my %params=@_;
- if (defined $user) {
- $user = IkiWiki::possibly_foolish_untaint($user);
- }
- elsif (defined $ipaddr) {
- $user = "Anonymous from ".IkiWiki::possibly_foolish_untaint($ipaddr);
- }
- else {
- $user = "Anonymous";
+ my $user="Anonymous";
+ if (defined $params{session}) {
+ if (defined $params{session}->param("name")) {
+ $user = $params{session}->param("name");
+ }
+ elsif (defined $params{session}->remote_addr()) {
+ $user = "Anonymous from ".$params{session}->remote_addr();
+ }
}
- $message = IkiWiki::possibly_foolish_untaint($message);
- if (! length $message) {
- $message = "no message given";
+ if (! length $params{message}) {
+ $params{message} = "no message given";
}
my @cmdline = ("hg", "-q", "-R", $config{srcdir}, "commit",
- "-m", $message, "-u", $user);
+ "-m", IkiWiki::possibly_foolish_untaint($params{message}),
+ "-u", IkiWiki::possibly_foolish_untaint($user));
if (system(@cmdline) != 0) {
warn "'@cmdline' failed: $!";
}
return undef; # success
}
-sub rcs_commit_staged ($$$) {
+sub rcs_commit_staged (@) {
# Commits all staged changes. Changes can be staged using rcs_add,
# rcs_remove, and rcs_rename.
- my ($message, $user, $ipaddr)=@_;
+ my %params=@_;
error("rcs_commit_staged not implemented for mercurial"); # TODO
}
sub rcs_getctime ($) {
my ($file) = @_;
- # XXX filename passes through the shell here, should try to avoid
- # that just in case
my @cmdline = ("hg", "-R", $config{srcdir}, "log", "-v",
- "--style", "default", "$config{srcdir}/$file");
- open (my $out, "@cmdline |");
+ "--style", "default", $file);
+ open (my $out, "-|", @cmdline);
- my @log = mercurial_log($out);
+ my @log = (mercurial_log($out));
- if (length @log < 1) {
+ if (@log < 1) {
return 0;
}
}
my $session=$params{session};
- my $user=$session->param("name") if $session;
+ my $user=$session->param("name");
if (pagespec_match($params{page}, $config{moderate_pagespec},
location => $params{page},
(defined $user ? (user => $user) : ()),
- (defined $ENV{REMOTE_ADDR} ? (ip => $ENV{REMOTE_ADDR}) : ()),
+ (defined $session->remote_addr() ? (ip => $session->remote_addr()) : ()),
)) {
return gettext("comment needs moderation");
}
return get_rev();
}
-sub rcs_commit ($$$;$$) {
+sub commitauthor (@) {
+ my %params=@_;
+
+ if (defined $params{session}) {
+ if (defined $params{session}->param("name")) {
+ return "Web user: " . $params{session}->param("name");
+ }
+ elsif (defined $params{session}->remote_addr()) {
+ return "Web IP: " . $params{session}->remote_addr();
+ }
+ }
+ return "Web: Anonymous";
+}
+
+
+sub rcs_commit (@) {
# Tries to commit the page; returns undef on _success_ and
# a version of the page with the rcs's conflict markers on failure.
# The file is relative to the srcdir.
- my $file=shift;
- my $message=shift;
- my $rcstoken=shift;
- my $user=shift;
- my $ipaddr=shift;
- my $author;
+ my %params=@_;
- if (defined $user) {
- $author="Web user: " . $user;
- }
- elsif (defined $ipaddr) {
- $author="Web IP: " . $ipaddr;
- }
- else {
- $author="Web: Anonymous";
- }
+ my $author=IkiWiki::possibly_foolish_untaint(commitauthor(%params)),
chdir $config{srcdir}
or error("Cannot chdir to $config{srcdir}: $!");
- my ($oldrev)= $rcstoken=~ m/^($sha1_pattern)$/; # untaint
+ my ($oldrev) = $params{token} =~ m/^($sha1_pattern)$/; # untaint
my $rev = get_rev();
if (defined $rev && defined $oldrev && $rev ne $oldrev) {
my $automator = Monotone->new();
# Something has been committed, has this file changed?
my ($out, $err);
$automator->setOpts("r", $oldrev, "r", $rev);
- ($out, $err) = $automator->call("content_diff", $file);
- debug("Problem committing $file") if ($err ne "");
+ ($out, $err) = $automator->call("content_diff", $params{file});
+ debug("Problem committing $params{file}") if ($err ne "");
my $diff = $out;
if ($diff) {
#
# first get the contents
debug("File changed: forming branch");
- my $newfile=readfile("$config{srcdir}/$file");
+ my $newfile=readfile("$config{srcdir}/$params{file}");
# then get the old content ID from the diff
- if ($diff !~ m/^---\s$file\s+($sha1_pattern)$/m) {
- error("Unable to find previous file ID for $file");
+ if ($diff !~ m/^---\s$params{file}\s+($sha1_pattern)$/m) {
+ error("Unable to find previous file ID for $params{file}");
}
my $oldFileID = $1;
my $branch = $1;
# then put the new content into the DB (and record the new content ID)
- my $newRevID = commit_file_to_new_rev($automator, $file, $oldFileID, $newfile, $oldrev, $branch, $author, $message);
+ my $newRevID = commit_file_to_new_rev($automator, $params{file}, $oldFileID, $newfile, $oldrev, $branch, $author, $params{message});
$automator->close();
# if we made it to here then the file has been committed... revert the local copy
- if (system("mtn", "--root=$config{mtnrootdir}", "revert", $file) != 0) {
- debug("Unable to revert $file after merge on conflicted commit!");
+ if (system("mtn", "--root=$config{mtnrootdir}", "revert", $params{file}) != 0) {
+ debug("Unable to revert $params{file} after merge on conflicted commit!");
}
debug("Divergence created! Attempting auto-merge.");
# for cleanup note, this relies on the fact
# that ikiwiki seems to call rcs_prepedit()
# again after we return
- return readfile("$config{srcdir}/$file");
+ return readfile("$config{srcdir}/$params{file}");
}
return undef;
}
if (system("mtn", "--root=$config{mtnrootdir}", "commit", "--quiet",
"--author", $author, "--key", $config{mtnkey}, "-m",
- IkiWiki::possibly_foolish_untaint($message), $file) != 0) {
+ IkiWiki::possibly_foolish_untaint($params{message}),
+ $params{file}) != 0) {
debug("Traditional commit failed! Returning data as conflict.");
- my $conflict=readfile("$config{srcdir}/$file");
+ my $conflict=readfile("$config{srcdir}/$params{file}");
if (system("mtn", "--root=$config{mtnrootdir}", "revert",
- "--quiet", $file) != 0) {
+ "--quiet", $params{file}) != 0) {
debug("monotone revert failed");
}
return $conflict;
return undef # success
}
-sub rcs_commit_staged ($$$) {
+sub rcs_commit_staged (@) {
# Commits all staged changes. Changes can be staged using rcs_add,
# rcs_remove, and rcs_rename.
- my ($message, $user, $ipaddr)=@_;
-
+ my %params=@_;
+
# Note - this will also commit any spurious changes that happen to be
# lying around in the working copy. There shouldn't be any, but...
chdir $config{srcdir}
or error("Cannot chdir to $config{srcdir}: $!");
- my $author;
-
- if (defined $user) {
- $author="Web user: " . $user;
- }
- elsif (defined $ipaddr) {
- $author="Web IP: " . $ipaddr;
- }
- else {
- $author="Web: Anonymous";
- }
-
if (system("mtn", "--root=$config{mtnrootdir}", "commit", "--quiet",
- "--author", $author, "--key", $config{mtnkey}, "-m",
- IkiWiki::possibly_foolish_untaint($message)) != 0) {
+ "--author", IkiWiki::possibly_foolish_untaint(commitauthor(%params)),
+ "--key", $config{mtnkey}, "-m",
+ IkiWiki::possibly_foolish_untaint($params{message})) != 0) {
error("Monotone commit failed");
}
}
return ""
}
-sub rcs_commit ($$$;$$) {
- my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
+sub rcs_commit (@) {
return undef # success
}
-sub rcs_commit_staged ($$$) {
- my ($message, $user, $ipaddr)=@_;
+sub rcs_commit_staged (@) {
return undef # success
}
rebuild => 0,
section => "auth",
},
+ openid_realm => {
+ type => "string",
+ description => "url pattern of openid realm (default is cgiurl)",
+ safe => 0,
+ rebuild => 0,
+ },
+ openid_cgiurl => {
+ type => "string",
+ description => "url to ikiwiki cgi to use for openid authentication (default is cgiurl)",
+ safe => 0,
+ rebuild => 0,
+ },
}
sub openid_selector {
);
}
+ my $cgiurl=$config{openid_cgiurl};
+ $cgiurl=$config{cgiurl} if ! defined $cgiurl;
+
+ my $trust_root=$config{openid_realm};
+ $trust_root=$cgiurl if ! defined $trust_root;
+
my $check_url = $claimed_identity->check_url(
- return_to => IkiWiki::cgiurl(do => "postsignin"),
- trust_root => $config{cgiurl},
+ return_to => "$cgiurl?do=postsignin",
+ trust_root => $trust_root,
delayed_return => 1,
);
# Redirect the user to the OpenID server, which will
$secret=rand;
$session->param(openid_secret => $secret);
}
+
+ my $cgiurl=$config{openid_cgiurl};
+ $cgiurl=$config{cgiurl} if ! defined $cgiurl;
return Net::OpenID::Consumer->new(
ua => $ua,
args => $q,
consumer_secret => sub { return shift()+$secret },
- required_root => $config{cgiurl},
+ required_root => $cgiurl,
);
}
),
wikiurl => $config{url},
wikiname => $config{wikiname},
- REMOTE_ADDR => $ENV{REMOTE_ADDR},
+ remote_addr => $session->remote_addr(),
);
eval q{use Mail::Sendmail};
if ($updated_po_files) {
commit_and_refresh(
- gettext("updated PO files"),
- "IkiWiki::Plugin::po::change");
+ gettext("updated PO files"));
}
}
if (@todelete) {
commit_and_refresh(
- gettext("removed obsolete PO files"),
- "IkiWiki::Plugin::po::deletetranslations");
+ gettext("removed obsolete PO files"));
}
}
-sub commit_and_refresh ($$) {
- my ($msg, $author) = (shift, shift);
+sub commit_and_refresh ($) {
+ my $msg = shift;
if ($config{rcs}) {
IkiWiki::disable_commit_hook();
- IkiWiki::rcs_commit_staged($msg, $author, "127.0.0.1");
+ IkiWiki::rcs_commit_staged(
+ message => $msg,
+ );
IkiWiki::enable_commit_hook();
IkiWiki::rcs_update();
}
$oldchoice=$session->param($choice_param);
if ($config{rcs}) {
IkiWiki::disable_commit_hook();
- IkiWiki::rcs_commit($pagesources{$page}, "poll vote ($choice)",
- IkiWiki::rcs_prepedit($pagesources{$page}),
- $session->param("name"), $ENV{REMOTE_ADDR});
+ IkiWiki::rcs_commit(
+ file => $pagesources{$page},
+ message => "poll vote ($choice)",
+ token => IkiWiki::rcs_prepedit($pagesources{$page}),
+ session => $session,
+ );
IkiWiki::enable_commit_hook();
IkiWiki::rcs_update();
}
];
push @{$change->{pages}}, { link => '...' } if $is_excess;
- # See if the committer is an openid.
$change->{author}=$change->{user};
my $oiduser=eval { IkiWiki::openiduser($change->{user}) };
if (defined $oiduser) {
$change->{authorurl}=$change->{user};
- $change->{user}=$oiduser;
+ $change->{user}=defined $change->{usershort} ? $change->{usershort} : $oiduser;
}
elsif (length $config{cgiurl}) {
$change->{authorurl} = IkiWiki::cgiurl(
foreach my $file (@files) {
IkiWiki::rcs_remove($file);
}
- IkiWiki::rcs_commit_staged(gettext("removed"),
- $session->param("name"), $ENV{REMOTE_ADDR});
+ IkiWiki::rcs_commit_staged(
+ message => gettext("removed"),
+ session => $session,
+ );
IkiWiki::enable_commit_hook();
IkiWiki::rcs_update();
}
$pagesources{$rename->{src}}=$rename->{destfile};
}
IkiWiki::rcs_commit_staged(
- sprintf(gettext("rename %s to %s"), $srcfile, $destfile),
- $session->param("name"), $ENV{REMOTE_ADDR}) if $config{rcs};
+ message => sprintf(gettext("rename %s to %s"), $srcfile, $destfile),
+ session => $session,
+ ) if $config{rcs};
# Then link fixups.
foreach my $rename (@torename) {
$file,
sprintf(gettext("update for rename of %s to %s"), $rename->{srcfile}, $rename->{destfile}),
$token,
- $session->param("name"),
- $ENV{REMOTE_ADDR}
+ $session->param("name"),
+ $session->remote_addr(),
);
push @fixedlinks, $page if ! defined $conflict;
}
debug("skeleton plugin refresh");
}
-sub needsbuild () {
+sub needsbuild ($) {
debug("skeleton plugin needsbuild");
}
}
}
-sub rcs_commit ($$$;$$) {
+sub commitmessage (@) {
+ my %params=@_;
+
+ if (defined $params{session}) {
+ if (defined $params{session}->param("name")) {
+ return "web commit by ".
+ $params{session}->param("name").
+ (length $params{message} ? ": $params{message}" : "");
+ }
+ elsif (defined $params{session}->remote_addr()) {
+ return "web commit from ".
+ $params{session}->remote_addr().
+ (length $params{message} ? ": $params{message}" : "");
+ }
+ }
+ return $params{message};
+}
+
+sub rcs_commit (@) {
# Tries to commit the page; returns undef on _success_ and
# a version of the page with the rcs's conflict markers on failure.
# The file is relative to the srcdir.
- my $file=shift;
- my $message=shift;
- my $rcstoken=shift;
- my $user=shift;
- my $ipaddr=shift;
-
- if (defined $user) {
- $message="web commit by $user".(length $message ? ": $message" : "");
- }
- elsif (defined $ipaddr) {
- $message="web commit from $ipaddr".(length $message ? ": $message" : "");
- }
+ my %params=@_;
if (-d "$config{srcdir}/.svn") {
# Check to see if the page has been changed by someone
# else since rcs_prepedit was called.
- my ($oldrev)=$rcstoken=~/^([0-9]+)$/; # untaint
- my $rev=svn_info("Revision", "$config{srcdir}/$file");
+ my ($oldrev)=$params{token}=~/^([0-9]+)$/; # untaint
+ my $rev=svn_info("Revision", "$config{srcdir}/$params{file}");
if (defined $rev && defined $oldrev && $rev != $oldrev) {
# Merge their changes into the file that we've
# changed.
if (system("svn", "merge", "--quiet", "-r$oldrev:$rev",
- "$config{srcdir}/$file", "$config{srcdir}/$file") != 0) {
+ "$config{srcdir}/$params{file}", "$config{srcdir}/$params{file}") != 0) {
warn("svn merge -r$oldrev:$rev failed\n");
}
}
if (system("svn", "commit", "--quiet",
"--encoding", "UTF-8", "-m",
- IkiWiki::possibly_foolish_untaint($message),
+ IkiWiki::possibly_foolish_untaint(commitmessage(%params)),
$config{srcdir}) != 0) {
- my $conflict=readfile("$config{srcdir}/$file");
- if (system("svn", "revert", "--quiet", "$config{srcdir}/$file") != 0) {
+ my $conflict=readfile("$config{srcdir}/$params{file}");
+ if (system("svn", "revert", "--quiet", "$config{srcdir}/$params{file}") != 0) {
warn("svn revert failed\n");
}
return $conflict;
return undef # success
}
-sub rcs_commit_staged ($$$) {
+sub rcs_commit_staged (@) {
# Commits all staged changes. Changes can be staged using rcs_add,
# rcs_remove, and rcs_rename.
- my ($message, $user, $ipaddr)=@_;
-
- if (defined $user) {
- $message="web commit by $user".(length $message ? ": $message" : "");
- }
- elsif (defined $ipaddr) {
- $message="web commit from $ipaddr".(length $message ? ": $message" : "");
- }
+ my %params=@_;
if (system("svn", "commit", "--quiet",
"--encoding", "UTF-8", "-m",
- IkiWiki::possibly_foolish_untaint($message),
+ IkiWiki::possibly_foolish_untaint(commitmessage(%params)),
$config{srcdir}) != 0) {
warn("svn commit failed\n");
return 1; # failure
if ($config{rcs}) {
IkiWiki::disable_commit_hook();
IkiWiki::rcs_add($tagfile);
- IkiWiki::rcs_commit_staged($message, undef, undef);
+ IkiWiki::rcs_commit_staged(message => $message);
IkiWiki::enable_commit_hook();
}
});
--- /dev/null
+#!/usr/bin/perl
+package IkiWiki::Plugin::theme;
+
+use warnings;
+use strict;
+use IkiWiki 3.00;
+
+sub import {
+ hook(type => "getsetup", id => "theme", call => \&getsetup);
+ hook(type => "checkconfig", id => "theme", call => \&checkconfig);
+ hook(type => "needsbuild", id => "theme", call => \&needsbuild);
+}
+
+sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ rebuild => 0,
+ section => "web",
+ },
+ theme => {
+ type => "string",
+ example => "actiontabs",
+ description => "name of theme to enable",
+ safe => 1,
+ rebuild => 0,
+ },
+}
+
+my $added=0;
+sub checkconfig () {
+ if (! $added && exists $config{theme} && $config{theme} =~ /^\w+$/) {
+ add_underlay("themes/".$config{theme});
+ $added=1;
+ }
+}
+
+sub needsbuild ($) {
+ my $needsbuild=shift;
+ if (($config{theme} || '') ne ($wikistate{theme}{currenttheme} || '')) {
+ # theme changed; ensure all files in the theme are built
+ my %needsbuild=map { $_ => 1 } @$needsbuild;
+ if ($config{theme}) {
+ foreach my $file (glob("$config{underlaydirbase}/themes/$config{theme}/*")) {
+ if (-f $file) {
+ my $f=IkiWiki::basename($file);
+ push @$needsbuild, $f
+ unless $needsbuild{$f};
+ }
+ }
+ }
+ elsif ($wikistate{theme}{currenttheme}) {
+ foreach my $file (glob("$config{underlaydirbase}/themes/$wikistate{theme}{currenttheme}/*")) {
+ my $f=IkiWiki::basename($file);
+ if (-f $file && defined eval { srcfile($f) }) {
+ push @$needsbuild, $f;
+ }
+ }
+ }
+
+ $wikistate{theme}{currenttheme}=$config{theme};
+ }
+}
+
+1
}
}
-sub rcs_commit ($$$;$$) {
- my $file=shift;
- my $message=shift;
- my $rcstoken=shift;
- my $user=shift;
- my $ipaddr=shift;
+sub rcs_commit (@) {
+ my %params=@_;
- if (defined $user) {
- $message="web commit by $user".(length $message ? ": $message" : "");
- }
- elsif (defined $ipaddr) {
- $message="web commit from $ipaddr".(length $message ? ": $message" : "");
+ my ($file, $message, $rcstoken)=
+ ($params{file}, $params{message}, $params{token});
+
+ if (defined $params{session}) {
+ if (defined $params{session}->param("name")) {
+ $message="web commit by ".
+ $params{session}->param("name").
+ (length $message ? ": $message" : "");
+ }
+ elsif (defined $params{session}->remote_addr()) {
+ $message="web commit from ".
+ $params{session}->remote_addr().
+ (length $message ? ": $message" : "");
+ }
}
if (-d "$config{srcdir}/{arch}") {
return undef # success
}
-sub rcs_commit_staged ($$$) {
+sub rcs_commit_staged (@) {
# Commits all staged changes. Changes can be staged using rcs_add,
# rcs_remove, and rcs_rename.
- my ($message, $user, $ipaddr)=@_;
+ my %params=@_;
error("rcs_commit_staged not implemented for tla"); # TODO
}
sub disable_plugin ($) {
my $plugin=shift;
- if (grep { $_ eq $plugin } @{$config{add_plugins}}) {
- $config{add_plugins}=[grep { $_ ne $plugin } @{$config{add_plugins}}];
- }
- else {
- push @{$config{disable_plugins}}, $plugin;
- }
+ $config{add_plugins}=[grep { $_ ne $plugin } @{$config{add_plugins}}];
+ push @{$config{disable_plugins}}, $plugin;
}
sub showform ($$) {
use warnings;
use strict;
use IkiWiki 3.00;
-use Encode;
sub import {
add_underlay("wmd");
eval q{use CGI};
error($@) if $@;
my $cgi=CGI->new;
- $ENV{REMOTE_ADDR}='unknown' unless exists $ENV{REMOTE_ADDR};
# And dummy up a session object.
require IkiWiki::CGI;
eval q{use File::Find};
error($@) if $@;
- my ($page, $dir, $underlay);
+ eval q{use Cwd};
+ die $@ if $@;
+ my $origdir=getcwd();
+ my $abssrcdir=Cwd::abs_path($config{srcdir});
+
+ my ($page, $underlay);
my $helper=sub {
my $file=decode_utf8($_);
return if -l $file || -d _;
- $file=~s/^\Q$dir\E\/?//;
+ $file=~s/^\.\///;
return if ! length $file;
$page = pagename($file);
if (! exists $pagesources{$page} &&
if ($underlay) {
# avoid underlaydir override attacks; see security.mdwn
- if (! -l "$config{srcdir}/$f" && ! -e _) {
+ if (! -l "$abssrcdir/$f" && ! -e _) {
if (! $pages{$page}) {
push @files, $f;
$pages{$page}=1;
}
};
+ chdir($config{srcdir}) || die "chdir $config{srcdir}: $!";
find({
no_chdir => 1,
wanted => $helper,
- }, $dir=$config{srcdir});
+ }, '.');
+ chdir($origdir) || die "chdir $origdir: $!";
+
$underlay=1;
foreach (@{$config{underlaydirs}}, $config{underlaydir}) {
- find({
- no_chdir => 1,
- wanted => $helper,
- }, $dir=$_);
+ if (chdir($_)) {
+ find({
+ no_chdir => 1,
+ wanted => $helper,
+ }, '.');
+ chdir($origdir) || die "chdir: $!";
+ }
};
+
return \@files, \%pages;
}
foreach my $file (@$files) {
my $page=pagename($file);
+
+ if ($config{rcs} && $config{gettime} &&
+ -e "$config{srcdir}/$file") {
+ if (! $times_noted) {
+ debug(sprintf(gettext("querying %s for file creation and modification times.."), $config{rcs}));
+ $times_noted=1;
+ }
+
+ eval {
+ my $ctime=rcs_getctime("$config{srcdir}/$file");
+ if ($ctime > 0) {
+ $pagectime{$page}=$ctime;
+ }
+ };
+ if ($@) {
+ print STDERR $@;
+ }
+ my $mtime;
+ eval {
+ $mtime=rcs_getmtime("$config{srcdir}/$file");
+ };
+ if ($@) {
+ print STDERR $@;
+ }
+ elsif ($mtime > 0) {
+ utime($mtime, $mtime, "$config{srcdir}/$file");
+ }
+ }
+
if (exists $pagesources{$page} && $pagesources{$page} ne $file) {
# the page has changed its type
$forcerebuild{$page}=1;
if (isinternal($page)) {
push @internal_new, $file;
}
- elsif ($config{rcs}) {
+ else {
push @new, $file;
- if ($config{gettime} && -e "$config{srcdir}/$file") {
- if (! $times_noted) {
- debug(sprintf(gettext("querying %s for file creation and modification times.."), $config{rcs}));
- $times_noted=1;
- }
-
- eval {
- my $ctime=rcs_getctime("$config{srcdir}/$file");
- if ($ctime > 0) {
- $pagectime{$page}=$ctime;
- }
- };
- if ($@) {
- print STDERR $@;
- }
- my $mtime;
- eval {
- $mtime=rcs_getmtime("$config{srcdir}/$file");
- };
- if ($@) {
- print STDERR $@;
- }
- elsif ($mtime > 0) {
- utime($mtime, $mtime, "$config{srcdir}/$file");
- }
- }
}
$pagecase{lc $page}=$page;
if (! exists $pagectime{$page}) {
# Load all plugins, so that all setup options are available.
my @plugins=IkiWiki::listplugins();
foreach my $plugin (@plugins) {
- eval { IkiWiki::loadplugin($plugin) };
+ eval { IkiWiki::loadplugin($plugin, 1) };
if (exists $IkiWiki::hooks{checkconfig}{$plugin}{call}) {
my @s=eval { $IkiWiki::hooks{checkconfig}{$plugin}{call}->() };
}
install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive
for file in doc/ikiwiki/directive/*; do \
if [ -f "$$file" ]; then \
+ cp -aL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive 2>/dev/null || \
install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/directives/ikiwiki/directive; \
fi \
done
-
+
+ # Themes have their style.css appended to the normal one.
+ for theme in themes/*; do \
+ install -d $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme; \
+ for file in $$theme/*; do \
+ if echo "$$file" | grep -q style.css; then \
+ (cat doc/style.css; cat $$file) >> $(DESTDIR)$(PREFIX)/share/ikiwiki/$$theme/style.css; \
+ elif [ -f "$$file" ]; then \
+ cp -aL $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$file 2>/dev/null || \
+ install -m 644 $$file $(DESTDIR)$(PREFIX)/share/ikiwiki/$$file; \
+ fi \
+ done; \
+ done
+
extra_install: underlay_install
# Install example sites.
for dir in `cd doc/examples; find . -type d ! -regex '.*\.svn.*'`; do \
example => "blog",
comments_pagespec => "posts/* and !*/Discussion",
blogspam_pagespec => "postcomment(*)",
- archive_pagespec => "posts/* and !*/Discussion",
+ archive_pagespec => "page(posts/*) and !*/Discussion",
global_sidebars => 0,
discussion => 0,
locked_pages => "*",
+ikiwiki (3.20100624) UNRELEASED; urgency=low
+
+ * API: Add new optional field usershort to rcs_recentchanges.
+ * API: rcs_commit and rcs_commit_staged are now passed named
+ parameters.
+
+ -- Joey Hess <joeyh@debian.org> Wed, 23 Jun 2010 15:30:04 -0400
+
+ikiwiki (3.20100623) unstable; urgency=low
+
+ * openid: Add openid_realm and openid_cgiurl configuration options,
+ useful in a few edge case setups.
+ * attachment: Show files from underlay in attachments list.
+ * img: Support hspace and vspace attributes.
+ * editpage: Rename "comments" field to avoid CSS conflict with the
+ comments div.
+ * edittemplate: Make silent mode not disable display when the template
+ page does not exist, so it can be easily created.
+ * edittemplate: Look for template pages under templates/ like everything
+ else (still looks in old location for backwards compatibility).
+ * attachment: When inserting links, insert img directives for images,
+ if that plugin is enabled.
+ * websetup: Allow enabling plugins listed in disable_plugins.
+ * editpage, comments: Fix broken links in sidebar (due to forcebaseurl).
+ (Thanks, privat)
+ * calendar: Tune archive_pagespec to only match pages, not other files.
+ * Fix issues with combining unicode srcdirs and source files.
+ (Workaround bug #586045)
+ * Make --gettime be honored after initial setup.
+ * git: Fix --gettime to properly support utf8 filenames.
+ * attachment: Support Windows paths when taking basename of client-supplied
+ file name.
+ * theme: New plugin, allows easily themeing a site via the underlay.
+ * Added actiontabs theme by Svend Sorensen.
+ * Added blueview theme by Bernd Zeimetz.
+ * mercurial: Fix buggy getctime code. Closes: #586279
+ * link: Enhanced to handle URLs and email addresses. (Bernd Zeimetz)
+
+ -- Joey Hess <joeyh@debian.org> Wed, 23 Jun 2010 14:10:26 -0400
+
ikiwiki (3.20100610) unstable; urgency=low
* creation_day() etc use local time, not gmtime. To match calendars, which
Copyright: © 2005-2008 by John Resig, Branden Aaron & Jörn Zaefferer
License: GPL-2
+Files: underlays/themes/blueview/style.css
+Copyright:
+ © 2009,2010 Bernd Zeimetz
+ © 2008 Yahoo! Inc.
+License: GPL-2+
+ Parts derived from BSD-C3 licensed YUI library.
+ http://developer.yahoo.com/yui/license.html
+
+Files: underlays/themes/blueview/*
+Copyright: © 2009,2010 Bernd Zeimetz
+License: GPL-2+
+
License: BSD-C2
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
--- /dev/null
+It seems as if windows clients (IE) submit filenames with backslash as directory separator.
+(no surprise :-).
+
+But the attachment plugin translates these backslashes to underscore, making the
+whole path a filename.
+
+> As far as I can see, that just means that the file will be saved with
+> a filename something like `c:__92__My_Documents__92__somefile`.
+> I don't see any "does not work" here. Error message?
+>
+> Still, I don't mind adding a special case, though obviously not in
+> `basename`. [[done]] --[[Joey]]
+
+>> Well, it's probably something else also, I get **bad attachment filename**.
+>> Now, that could really be a bad filename, problem is that it wasn't. I even
+>> tried applying the **wiki_file_prune_regexps** one by one to see what was
+>> causing it. No problem there. The strange thing is that the error shows up
+>> when using firefox on windows too. But the backslash hack fixes at least the
+>> incorrect filename from IE (firefox on windows gave me the correct filename.
+>> I'll do some more digging... :-) /jh
+
+This little hack fixed the backslash problem, although I wonder if that
+really is the problem?
+(Everything works perfectly from linux clients of course. :-)
+
+ sub basename ($) {
+ my $file=shift;
+
+ $file=~s!.*/+!!;
+ $file=~s!.*\\+!!;
+ return $file;
+ }
+
+Should probably be `$file=~s!.*[/\\]+!!` :-)
> [[done]] --[[Joey]]
->> It works here but it definitely does *not* work on my wiki; but on further experimentation, I believe my problem is being caused by JasonBlevins' [h1title](http://code.jblevins.org/ikiwiki/plugins.git/plain/h1title.pm) plugin.
+>> It works here but it definitely does *not* work on my wiki; but on further experimentation, I believe my problem is being caused by JasonBlevins' [h1title](http://jblevins.org/git/ikiwiki/plugins.git/plain/h1title.pm) plugin.
> This is a bug. --[[Joey]]
> And .. [[fixed|done]] --[[Joey]]
+
+>> Not quite; For some reason it requires me to update wiki pages twice before the height value shows up.
>> scripts again...
>>
>> --[[tschwinge]]
+
+>>> It seems, the 'align=right' parameter gets filtered in my installation
+>>> Are there other plugins, that could throw the parameter away?
+>>> --[[jwalzer]]
+
+>>>> Can't think of anything. htmlscrubber doesn't; tidy doesn't.
+>>>> --[[Joey]]
> The [[version_3.20100515]] announcment mentions that you need to
> update old `page.tmpl` files to include that on upgrade. --[[Joey]]
+>> I followed the anouncment. I also disabled my custom page.tmpl to confirm the bug. I even produced a step-by-step example to reproduce the bug.
+>> In fact, the base tag work for the page links (the content part) but did not works for the sidebar links (the sidebar part) since the sidebar links are generated in the context of the root page.
+>> In the examble above:
+>>
+>> * base="http://www.example.com/bar" relative_link_in_bar=''something" -> absolute_link_in_bar = "http://www.example.com/bar/something" (that is fine)
+>> * base="http://www.example.com/bar" relative_link_in_sidebar="foo" (because generated in the context of the root page) -> absolute_link_in_sidebar = "http://www.example.com/bar/foo" (that is not fine)
+>>
+>> The fix commited work for previewing, but not in other cases : links are still broken. Please juste follow the example step-by-step to reproduce it (I just retried it with a "fixed" version: Debian 3.20100610). If you cannot reproduce, please say it explicitely instead of guessing about my innability to read changelogs. -- [[JeanPrivat]]
+
+>>> Sorry if my not seeing the bug offended you. [[Fixed|done]] --[[Joey]]
+
+>>>> Thanks! --[[JeanPrivat]] (I'm not offended)
+
### A second example
* create "/bar/sidebar.mdwn" with "world"
> the "are you sure" confirmation page to display the page's sidebar?
> --[[Joey]]
+>> It is a very good point and could be argued:
+>>
+>> * for dynamic page, is the root context more legitimate than the current page context?
+>> * when clicking the Edit link, does the user expect to remain in the "same page"?
+>>
+>> But, as far as something sensible is displayed and that the links work. I'm OK with any choice. -- [[JeanPrivat]]
+
### A last example
* with the web browser edit the page "bar"
> put the sidebar anywhere so we can't just display the preview sidebar
> next to the rest of the page preview. --[[Joey]]
+>> The behavior is fine for me. However, some nitpicking (fell free to ingore) :
+>>
+>> * If the sidebar is replaced (making the previewing in-place), for consitency, should not the previewed content also shown in-place ? i.e. above the form part
+>> * there is no way to come back (without saving or canceling) to the root context (e.g. displaying the root sidebar) i.e. some sort of unpreviewing.
+>>
+>> -- [[JeanPrivat]]
+
## Some superficial hacking
With the following workaround hacks, I manage to solve the 3 examples shown above:
> Oh, it's pretty reasonable. I don't think it breaks anything. :)
> I modified it a bit, and explicitly made it *not* "fix" the second example.
-> [[done]]
> --[[Joey]]
+>> I removed the done tag (I suspect it is the way to reopen bugs) -- [[JeanPrivat]]
If a file in the srcdir is removed, exposing a file in the underlaydir,
-ikiwiki will notice the removal and delete the page from the destdir. The
+ikiwiki will not notice the removal, and the
page from the underlay will not be built. (However, it will be if the wiki
gets rebuilt.)
+
+> This problem is caused by ikiwiki storing only filenames relative to
+> the srcdir or underlay, and mtime comparison not handling this case.
+
+> A related problem occurs if changing a site's theme with the
+> [[plugins/theme]] plugin. The style.css of the old and new theme
+> often has the same mtime, so ikiwiki does not update it w/o a rebuild.
+> This is worked around in theme.pm with a special-purpose needsbuild hook.
+> --[[Joey]]
While ikiwiki's default use of stylesheets is intentionally quite plain and
minimalistic, CSS allows creating any kind of look you can dream up.
+The [[theme_plugin|plugins/theme]] provides some prepackaged themes in an
+easy to use way.
+
The [[css_market]] page is an attempt to collect user contributed local.css
files.
dir with a filename of `local.css`.
Feel free to add your own stylesheets here. (Upload as wiki pages; wiki
-gnomes will convert them to css files..)
+gnomes will convert them to css files..) Selected ones from here are
+included in the [[theme_plugin|plugins/theme]].
* **[[css_market/zack.css]]**, contributed by [[StefanoZacchiroli]],
customized mostly for *blogging purposes*, can be seen in action on
[[!inline pages=sidebar raw=yes]]
"""]]
-[[!inline pages="./posts/* and !*/Discussion" show="10"
+[[!inline pages="page(./posts/*) and !*/Discussion" show="10"
actions=yes rootpage="posts"]]
-Here is a full list of posts to my [[blog|index]].
+Here is a full list of posts to the [[blog|index]].
-[[!inline pages="./posts/* and !*/Discussion" archive=yes feedshow=10 quick=yes]]
+[[!inline pages="page(./posts/*) and !*/Discussion" archive=yes feedshow=10 quick=yes]]
[[!if test="enabled(calendar)" then="""
-[[!calendar pages="./posts/* and !*/Discussion"]]
+[[!calendar pages="page(./posts/*) and !*/Discussion"]]
"""]]
[[Recent Comments|comments]]
--- /dev/null
+Hi,
+Installed ikiwiki on my ubuntu (04.10) box; after creating a blog according to your setup instructions I cannot edit files on the web interface, and I get this errer «The requested URL /~jean/blog/ikiwiki.cgi was not found on this server.»
+I have no idea what to do (sorry for my ignorance)
+
+tia,
+
+> Make sure you have a `~/public_html/ikiwiki.cgi`. Your setup
+> file should generate that via the `cgi_wrapper` option.
+>
+> Maybe you need to follow the [[tips/dot_cgi]] tip to make apache see it.
+> --[[Joey]]
--- /dev/null
+[[!comment format=mdwn
+ username="jeanm"
+ subject="comment 1"
+ date="2010-06-19T13:35:37Z"
+ content="""
+OK, I followed the dot cgi tip and this error diappears, thanks a lot! So ubuntu doesn't provide a \"working out of the box\" ikiwiki.
+
+But I get a new error message now when trying to edit a page:
+
+Error: \"do\" parameter missing
+
+My plugins now:
+add_plugins => [qw{goodstuff websetup comments blogspam 404 muse}],
+
+
+"""]]
--- /dev/null
+[[!comment format=mdwn
+ username="http://joey.kitenet.net/"
+ subject="do parameter missing"
+ date="2010-06-23T17:03:12Z"
+ content="""
+That's an unusual problem. Normally the url or form that calls ikiwiki.cgi includes a \"do\" parameter, like \"do=edit\". I'd have to see the site to debug why it is missing for you.
+"""]]
--- /dev/null
+I have a bunch of tag pages autogenerated by the tag plugin. As part of a redesign for my wiki, I have changed the `autotag.tmpl` template, but IkiWiki refuses to rebuild existing tag pages using the updated template. I understand that existing tag pages are not rebuilt because they have been marked as "created" in `.ikiwiki/indexdb`. Is there a way to purge all tag pages from `indexdb`? --dkobozev
+
+> Well, you can delete the indexdb and rebuild, and that will do it.
+> The tag plugin is careful not to replace existing pages or even recreate
+> tag pages if you delete them, which does cause a problem if you need to
+> update them. --[[Joey]]
+
+>> Thanks. I thought about deleting `indexdb`, but hesitated to do that. According to [[tips/inside dot ikiwiki]], `indexdb` stores "all persistent state about pages". I didn't know if it's harmless to lose all persistent state. --dkobozev
+
+>>> The persistant state is best thought of as a cache,
+>>> so it's safe to delete it. --[[Joey]]
--- /dev/null
+OK, this is not really a ikiwiki problem... but ikiwiki makes wiki clones
+really easy to setup, and this is related to having a website cloned at
+different places and pulling from the servers which are online.
+
+My setup is like this: I have a server at home and another at my dorm
+which will serve as a wiki clone. Each of them has a dynamic IP with DynDNS
+set up. Now the problem lies in linking my domain to these two DynDNS addresses.
+Multiple CNAMEs are not supported, and I don't know if there's any utility
+which can update the A records on the DNS to point directly point to the
+two separate IPs.
>> few other small plugins brewing so I'll try to put up some contrib
>> pages for them soon. --[[JasonBlevins]]
-[path]: http://code.jblevins.org/ikiwiki/plugins.git/plain/path.pm
+[path]: http://jblevins.org/git/ikiwiki/plugins.git/plain/path.pm
+
+> I used the following trick in some page.tmpl:
+>
+> <title><TMPL_VAR WIKINAME><TMPL_IF NAME="PARENTLINKS">: <TMPL_VAR TITLE></TMPL_IF></title>
+>
+> --[[JeanPrivat]]
the width or the height, and the other value will be calculated based on
it: "200x", "x200"
-You can also pass `alt`, `title`, `class`, `align` and `id` parameters.
+You can also pass `alt`, `title`, `class`, `align`, `id`, `hspace`, and
+`vspace` parameters.
These are passed through unchanged to the html img tag. If you include a
`caption` parameter, the caption will be displayed centered beneath the image.
> \[[!map pages="./*"]]
also lists the current page and all its siblings.
+
+---
+
+I am a little lost. I want to match the start page `/index.mdwn`. So I use
+
+ \[[!inline pages="/index"]]
+
+which does not work though. I also tried it in this Wiki. Just take a look at the end of the [[SandBox|sandbox]]. --[[PaulePanter]]
+
+> Unlike wikilinks, pagespecs match relative to the top of the wiki by
+> default. So lose the "/" and it will work. --[[Joey]]
There are some special [[SubPage/LinkingRules]] that come into play when
linking between [[SubPages|SubPage]].
-Also, if the file linked to by a WikiLink looks like an image, it will
-be displayed inline on the page.
-
WikiLinks are matched with page names in a case-insensitive manner, so you
don't need to worry about getting the case the same, and can capitalise
links at the start of a sentence, and so on.
To link to an anchor inside a page, you can use something like
`\[[WikiLink#foo]]` .
+
+If the file linked to by a WikiLink looks like an image, it will
+be displayed inline on the page.
+
+---
+
+You can also put an url in a WikiLink, to link to an external page.
+Email addresses can also be used to generate a mailto link.
* [Gustaf Thorslund's blog](http://blog.thorslund.org)
* [Ertug Karamatli](http://pages.karamatli.com)
* [Jonatan Walck](http://jonatan.walck.i2p/) a weblog + wiki over [I2P](http://i2p2.de/). Also [mirrored](http://jonatan.walck.se/) to the Internet a few times per day.
+* [Daniel Wayne Armstrong](http://circuidipity.com/)
Please feel free to add your own ikiwiki site!
+++ /dev/null
-*TMPL_INCLUDE is no longer supported in any template used by ikiwiki. It used to be allowed in certian templates, but not in others.*
-
-Would it be possible to make that a config option? Because I do use includes in my templates, and I don't allow users to edit templates, so it isn't a security loophole for me. --[[KathrynAndersen]]
-
-> I don't like config options that make wikis unsafe, but I should have
-> revisted enabling includes for templates read from the templatedir --
-> it's easy to do, and I've done it now. --[[Joey]]
-
->> Thank you! --[[KathrynAndersen]]
+++ /dev/null
-ikiwiki 3.20100501 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * TMPL\_INCLUDE re-enabled for templates read from the templatedir.
- (But not in-wiki templates.)
- * Version dependency on liburi-perl to >= 1.36; previous versions
- did not support building urls from utf-8 strings. Closes: #[579713](http://bugs.debian.org/579713)
- * Ikiwiki can be configured to generate html5 instead of the default xhtml
- 1.0. The html5 output mode is experimental, not yet fully standards
- compliant, and will be subject to rapid change.
- * htmlscrubber: Allow html5 semantic tags: section, nav, article, aside
- hgroup, header, footer, figure, figcaption, time, mark
- * htmlscrubber: Also allow some other html5 tags: canvas, progress, meter,
- ruby, rt, rp, details, summary, datalist.
- * htmlscrubber: Round out html5 video support with the preload
- attribute and the source tag.
- * htmlscrubber: Allow the html5 form attributes: placeholder, autofocus,
- min, max, step, required, autocomplete, novalidate, pattern, list,
- and form. (Also the form* override attributes for input and buttons.)
- * htmlscrubber: Allow additional misc html5 attributes: reversed,
- spellcheck, and hidden.
- * template: Fix typo."""]]
\ No newline at end of file
+++ /dev/null
-Thanks a lot for the HTML5 support! I'll have to try it some time soon.
+++ /dev/null
-ikiwiki 3.20100504 released with [[!toggle text="these changes"]]
-[[!toggleable text="""
- * Add parameter to displaytime to specify that it is a pubdate,
- and in html5 mode, use time tag.
- * Add placeholder text in search form (in html5 mode only).
- * In html5 mode, use all the nice new semantic tags. Care was taken
- to not change the id/class named used in the CSS, so only CSS
- that refers to tag types needed to be changed.
- * Add ACTIONS variable to page.tmpl, which allows plugins to add arbitrary
- links to the action bar without modifying the template further.
- (COMMENTSLINK and DISCUSSIONLINK could be folded into this, but
- are kept separate for now to avoid breaking modified templates.)
- * websetup: Only display Setup button on admins' preferences page.
- * graphviz: Fix display of preexisting images in preview mode.
- * Fixes a bug in skipping of illegal source files introduced in
- 3.20100427."""]]
\ No newline at end of file
--- /dev/null
+ikiwiki 3.20100610 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * creation\_day() etc use local time, not gmtime. To match calendars, which
+ use local time.
+ * img: Fill in missing height or width when scaling image.
+ * Remove example blog tag pages; allow autotag creation to create them
+ when used.
+ * Fix support for globbing in tagged() pagespecs.
+ * Fix display of sidebar when previewing page edit. (Thanks, privat)
+ * relativedate: Fix problem with localised dates not working.
+ * editpage: Avoid storing accidental state changes when previewing pages.
+ * page.tmpl: Add a div around the page content, and comments, to aide in
+ sidebar styling.
+ * style.css: Improvements to make floating sidebar fit much better on
+ pages with inlines.
+ * calendar: Shorten day names, and improve styling of month calendar.
+ * style.css: Reduced sidebar width back to 20ex from 30; the month calendar
+ will now fit in the smaller width, and 30 was feeling too large."""]]
\ No newline at end of file
--- /dev/null
+ikiwiki 3.20100623 released with [[!toggle text="these changes"]]
+[[!toggleable text="""
+ * openid: Add openid\_realm and openid\_cgiurl configuration options,
+ useful in a few edge case setups.
+ * attachment: Show files from underlay in attachments list.
+ * img: Support hspace and vspace attributes.
+ * editpage: Rename "comments" field to avoid CSS conflict with the
+ comments div.
+ * edittemplate: Make silent mode not disable display when the template
+ page does not exist, so it can be easily created.
+ * edittemplate: Look for template pages under templates/ like everything
+ else (still looks in old location for backwards compatibility).
+ * attachment: When inserting links, insert img directives for images,
+ if that plugin is enabled.
+ * websetup: Allow enabling plugins listed in disable\_plugins.
+ * editpage, comments: Fix broken links in sidebar (due to forcebaseurl).
+ (Thanks, privat)
+ * calendar: Tune archive\_pagespec to only match pages, not other files.
+ * Fix issues with combining unicode srcdirs and source files.
+ (Workaround bug #586045)
+ * Make --gettime be honored after initial setup.
+ * git: Fix --gettime to properly support utf8 filenames.
+ * attachment: Support Windows paths when taking basename of client-supplied
+ file name.
+ * theme: New plugin, allows easily themeing a site via the underlay.
+ * Added actiontabs theme by Svend Sorensen.
+ * Added blueview theme by Bernd Zeimetz.
+ * mercurial: Fix buggy getctime code. Closes: #[586279](http://bugs.debian.org/586279)
+ * link: Enhanced to handle URLs and email addresses. (Bernd Zeimetz)"""]]
\ No newline at end of file
## Plugin directory
[[!map pages="plugins/* and !plugins/type/* and !plugins/write and
-!plugins/write/* and !plugins/contrib and !plugins/install and !*/Discussion"]]
+!plugins/write/* and !plugins/contrib and !plugins/contrib/*/* and !plugins/install and !*/Discussion"]]
These plugins are provided by third parties and are not currently
included in ikiwiki. See [[install]] for installation help.
-[[!map pages="plugins/contrib/* and !*/Discussion"]]
+[[!map pages="plugins/contrib/* and !plugins/contrib/*/* and !*/Discussion"]]
>> "recently changed" list with the 10 most recently changed plugins
>> at the top. That would allow what you suggested, but still allow
>> the main list to be alphabetical. -- [[Will]]
+
+### `themes.pm` instead of `themes.mdwn`
+
+Could someone please change the filename. I cannot fix this using the Web interface. Somebody step in please. --[[PaulePanter]]
+
+> Oops, not the first time I've made that mistake! --[[Joey]]
[[!tag type/web]]
This plugin provides the [[ikiwiki/directive/edittemplate]] [[ikiwiki/directive]].
-This directive allows registering template pages, that provide default
-content for new pages created using the web frontend.
+This directive allows registering [[template|templates]] pages, that
+provide default content for new pages created using the web frontend.
[[!template id=plugin name=link core=1 author="[[Joey]]"]]
[[!tag type/link]]
-This plugin implements standard [[WikiLinks|ikiwiki/wikilink]].
+This plugin implements standard [[WikiLinks|ikiwiki/wikilink]] and links to
+external pages.
This plugin is enabled by default, but can be turned off if you want to
only use some other form of authentication, such as [[passwordauth]].
+
+## options
+
+These options do not normally need to be set, but can be useful in
+certian setups.
+
+* `openid_realm` can be used to control the scope of the openid request.
+ It defaults to the `cgiurl` (or `openid_cgiurl` if set); only allowing
+ ikiwiki's [[CGI]] to authenticate. If you have multiple ikiwiki instances,
+ or other things using openid on the same site, you may choose to put them
+ all in the same realm to improve the user's openid experience. It is an
+ url pattern, so can be set to eg "http://*.example.com/"
+
+* `openid_cgiurl` can be used to cause a different than usual `cgiurl`
+ to be used when doing openid authentication. The `openid_cgiurl` must
+ point to an ikiwiki [[CGI]], and it will need to match the `openid_realm`
+ to work.
--- /dev/null
+[[!template id=plugin name=theme author="[[Joey]]"]]
+[[!tag type/web]]
+
+The theme plugin allows easily applying a theme to your wiki, by
+configuring the `theme` setting in the setup file with the name of a theme
+to use. The themes you can choose from are all subdirectories, typically
+inside `/usr/share/ikiwiki/themes/`.
+
+A theme provides, via the underlay, an enhanced version of the regular
+[[style.css]]. This leaves [[local.css]] free for you to further
+customise. Themes can also provide header and background images.
--- /dev/null
+### What license do themes need to have for distribution?
+
+Could someone specify what license the themes need to have to get
+distributed in ikiwiki or Debian? The current included theme seem to be
+under the GPLv2. Does the [Creative Commons Attribution 3.0 Unported
+License](http://creativecommons.org/licenses/by/3.0/) also work. This way a
+lot of free CSS templates could be included, e. g. from
+[freecsstemplates.org](http://www.freecsstemplates.org/). --PaulePanter
+
+> Paule, I'd love it if you did that! The only hard requirement on themes
+> included in ikiwiki is that they need to be licensed with a [DFSG
+> compatable license](https://wiki.debian.org/DFSGLicenses). CC-BY-SA 3.0
+> is DFSG; CC-BY is apparently being accepted by Debian too.
+>
+> As a soft requirement, I may exersise some discretion about themes that
+> require obtrusive attributions links be included on every page of a
+> site using the theme. While probably DFSG, that adds a requirement
+> that ikiwiki itself does not require. --[[Joey]]
it might return the current revision ID of the file, and use that
information later when merging changes.
-#### `rcs_commit($$$;$$)`
+#### `rcs_commit(@)`
+
+Passed named parameters: `file`, `message`, `token` (from `rcs_prepedit`),
+and `session` (optional).
-Passed a file, message, token (from `rcs_prepedit`), user, and ip address.
Should try to commit the file. Returns `undef` on *success* and a version
of the page with the rcs's conflict markers on failure.
-#### `rcs_commit_staged($$$)`
+#### `rcs_commit_staged(@)`
+
+Passed named parameters: `message`, and `session` (optional).
-Passed a message, user, and ip address. Should commit all staged changes.
-Returns undef on success, and an error message on failure.
+Should commit all staged changes. Returns undef on success, and an
+error message on failure.
Changes can be staged by calls to `rcs_add`, `rcs_remove`, and
`rcs_rename`.
{
rev => # the RCSs id for this commit
- user => # name of user who made the change,
+ user => # user who made the change (may be an openid),
+ usershort => # short name of user (optional; not an openid),
+
committype => # either "web" or the name of the rcs,
when => # time when the change was made,
message => [
The other (optional) leaf node repositories are meant for you to work
on, and commit to, changes should then be pushed to the bare root
-repository. In theory, you could work on the same leaf node repository
-that ikiwiki uses to compile the wiki from, and the [[cgi]] commits
-to, as long as you ensure that permissions and ownership don't hinder
-the working of the [[cgi]]. This can be done, for example, by using
-ACL's, in practice, it is easier to just setup separate clones for
-yourself.
+repository.
So, to reiterate, when using Git, you probably want to set up three
repositories:
* The root repository. This should be a bare repository (meaning that
it does not have a working tree checked out), which the other
repositories will push to/pull from. It is a bare repository, since
- there are problems pushing to a repository that has a working
+ git does not support pushing to a repository that has a working
directory. This is called _repository_ in [[ikiwiki-makerepo]]'s
- manual page. Nominally, this bare repository has a `post-update` hook
+ manual page. This bare repository has a `post-update` hook
that either is or calls ikiwiki's git wrapper, which changes to the
working directory for ikiwiki, does a `git pull`, and refreshes ikiwiki
to regenerate the wiki with any new content. The [[setup]] page describes
* The second repository is a clone of the bare root repository, and
has a working tree which is used as ikiwiki's srcdir for compiling
- the wiki. **Never** push to this repository. When running as a
- [[cgi]], the changes are committed to this repository, and pushed to
- the master repository above. This is called _srcdir_ in
- [[ikiwiki-makerepo]]'s manual page.
+ the wiki. **Never** push to this repository. It is wise to not make
+ changes or commits directly to this repository, to avoid conflicting
+ with ikiwiki's own changes. When running as a [[cgi]], the changes
+ are committed to this repository, and pushed to the master repository
+ above. This is called _srcdir_ in [[ikiwiki-makerepo]]'s manual page.
* The other (third, fourth, fifth, sixth -- however many pleases you)
repositories are also clones of the bare root repository above --
commit to an ikiwiki git repository. As the [[security]] page mentions,
for a secure ikiwiki installation, only one person should be able to write
to ikiwiki's srcdir. When other committers make commits, their commits
-should go to the bare repository, which has a `post-update` hook that uses
-ikiwiki to pull the changes to the srcdir.
+should be pushed to the bare repository, which has a `post-update` hook
+that uses ikiwiki to pull the changes to the srcdir.
One setup that will work is to put all committers in a group (say,
"ikiwiki"), and use permissions to allow that group to commit to the bare git
1. And another..
1. foo
2. bar
+ 3. cool
Bulleted list
* item
* one
* footballs; runner; unices
+ * Cool !
+
----
test2
I assume this triggers a checkin and recompile?
+
+[[!inline pages="/index"]]
margin-top: .4em;
}
-.pagefooter {
- clear: both;
-}
-.inlinefooter {
+.pagefooter,
+.inlinefooter,
+.comments {
clear: both;
}
border-style: none;
}
+pre {
+ overflow: auto;
+}
+
div.recentchanges {
border-style: solid;
border-width: 1px;
label.inline {
display: inline;
}
-ol.form {
- list-style: none;
- padding: 0;
-}
-li.form {
- padding-bottom: 1em;
-}
input#openid_identifier {
background: url(wikiicons/openidlogin-bg.gif) no-repeat;
background-color: #fff;
Templates are located in `/usr/share/ikiwiki/templates` by default;
the `templatedir` setting can be used to make another directory be
-searched first. Customized templates can also be placed inside the
+searched first. Customised templates can also be placed inside the
"templates/" directory in your wiki's source.
Ikiwiki uses the HTML::Template module as its template engine. This
[[!if test="enabled(template)" then="""
## template pages
-The template directive allows wiki pages to be used as templates,
-filled out and inserted into other pages in the wiki.
-"""]]
-[[!if test="enabled(template) and enabled(inline)" then="""
-[[!inline pages="templates/* and !*.tmpl and !*/discussion"
-feeds=no archive=yes sort=title template=titlepage
-rootpage=templates postformtext="Add a new template named:"]]
+The [[!iki ikiwiki/directive/template desc="template directive"]] allows
+wiki pages to be used as templates, filled out and inserted into other
+pages in the wiki.
"""]]
[[!if test="enabled(edittemplate)" then="""
-## edit templates
+## default content for new pages
-The edittemplate directive can be used to make new pages default to
-containing text from a template, which can be filled as out the page is
-edited.
+The [[!iki ikiwiki/directive/edittemplate desc="edittemplate directive"]] can
+be used to make new pages default to containing text from a template
+page, which can be filled as out the page is edited.
+"""]]
+
+[[!if test="(enabled(template) or enabled(edittemplate))
+and enabled(inline)" then="""
+[[!inline pages="templates/* and !*.tmpl and !templates/*/* and !*/discussion"
+feeds=no archive=yes sort=title template=titlepage
+rootpage=templates postformtext="Add a new template named:"]]
"""]]
## wiki templates
html out of ikiwiki and in the templates.
* `page.tmpl` - Used for displaying all regular wiki pages. This is the
- key template to customize. [[!if test="enabled(pagetemplate)" then="""
- (The pagetemplate directive can be used to make a page use a
- different template than `page.tmpl`.)"""]]
+ key template to customise. [[!if test="enabled(pagetemplate)" then="""
+ (The [[!iki ikiwiki/directive/pagetemplate desc="pagetemplate directive"]]
+ can be used to make a page use a different template than `page.tmpl`.)"""]]
* `rsspage.tmpl` - Used for generating rss feeds for blogs.
* `rssitem.tmpl` - Used for generating individual items on rss feeds.
* `atompage.tmpl` - Used for generating atom feeds for blogs.
## the index
-`.ikiwiki/indexdb` contains a cache of information about pages, as well
-as all persisitant state about pages. It used to be a (semi) human-readable
-text file, but is not anymore.
+`.ikiwiki/indexdb` contains a cache of information about pages.
+This information can always be recalculated by rebuilding the wiki.
+(So the file is safe to delete and need not be backed up.)
+It used to be a (semi) human-readable text file, but is not anymore.
To dump the contents of the file, enter a perl command like this.
The format of the YAML setup file should be fairly self-explanatory.
+(To convert the other way, use "setuptype=Standard" instead.)
+
--[[Joey]]
[Google should grok feeds as sitemaps.](http://www.google.com/support/webmasters/bin/answer.py?answer=34654) Or rather [[plugins/inline]] should be improved to support the [sitemap protocol](http://sitemaps.org/protocol.php) natively.
-- [[Hendry]]
+
+
+Took me a minute to figure this out so I figured I'd share the steps I took:
+
+* Added rss=>1 and allowrss=>1 to my setup file
+* Created a new page where the RSS would be created with this content, replacing "first_page" with the page in my wiki with the earliest date:
+
+<pre>
+\[[!inline pages="* and !*/Discussion and created_after(first_page)" archive="yes" rss="yes" ]]
+</pre>
--- /dev/null
+It could be nice to mark some page such that:
+
+* the page is automatically published on some date (i.e. build, linked, syndicated, inlined/mapped, etc.)
+* the page is automatically unpublished at some other date (i.e. removed)
+
+I know that ikiwiki is a wiki compiler so that something has to refresh the wiki periodically to enforce the rules (a cronjob for instance). It seems to me that the calendar plugin rely on something similar.
+
+The date for publishing and expiring could be set be using some new directives; an alternative could be to expand the [[plugin/meta]] plugin with [<span/>[!meta date="auto publish date"]] and [<span/>[!meta expires="auto expire date"]].
+
+--[[JeanPrivat]]
+
+> This is a duplicate, and expansion, of
+> [[todo/tagging_with_a_publication_date]].
+> There, I suggest using a branch to develop
+> prepublication versions of a site, and merge from it
+> when the thing is published.
+>
+> Another approach I've seen used is to keep such pages in a pending/
+> directory, and move them via cron job when their publication time comes.
+> But that requires some familiarity with, and access to, cron.
+>
+> On [[todo/tagging_with_a_publication_date]], I also suggested using meta
+> date to set a page's date into the future,
+> and adding a pagespec that matches only pages with dates in the past,
+> which would allow filtering out the unpublished ones.
+> Sounds like you are thinking along these lines, but possibly using
+> something other than the page's creation or modification date to do it.
+>
+> I do think the general problem with that approach is that you have to be
+> careful to prevent the unpublished pages from leaking out in any
+> inlines, maps, etc. --[[Joey]]
+
+[[!tag wishlist]]
>>> I made a [[git]] branch for it [[!template id=gitbranch branch="privat/multiple_sidebars" author="[[jeanprivat]]"]] --[[jeanprivat]]
+>>>> Ping for [[Joey]]. Do you have any comment? I could improve it if there is things you do not like. I prefer to have such a feature integrated upstream. --[[JeanPrivat]]
+
+>>>>> The code is fine.
+>>>>>
+>>>>> I did think about having it examine
+>>>>> the `page.tmpl` for parameters with names like `FOO_SIDEBAR`
+>>>>> and automatically enable page `foo` as a sidebar in that case,
+>>>>> instead of using the setup file to enable. But I'm not sure about
+>>>>> that idea..
+>>>>>
+>>>>> The full compliment of sidebars would be a header, a footer,
+>>>>> a left, and a right sidebar. It would make sense to go ahead
+>>>>> and add the parameters to `page.tmpl` so enabling each just works,
+>>>>> and add whatever basic CSS makes sense. Although I don't know
+>>>>> if I want to try to get a 3 column CSS going, so perhaps leave the
+>>>>> left sidebar out of that.
+
<pre>
--- /usr/share/perl5/IkiWiki/Plugin/sidebar.pm 2010-02-11 22:53:17.000000000 -0500
+++ plugins/IkiWiki/Plugin/sidebar.pm 2010-02-27 09:54:12.524412391 -0500
--- /dev/null
+[[!tag wishlist]]
+
+Ikiwiki is static, so access control for viewing the wiki must be
+implemented on the web server side. Managing wiki users and access
+together, we can currently
+
+* use [[httpauth|plugins/httpauth/]], but some [[passwordauth|plugins/passwordauth]] functionnality [[is missing|todo/httpauth_feature_parity_with_passwordauth/]];
+* use [[passwordauth|plugins/passwordauth]] plus [[an Apache `mod_perl` authentication mechanism|plugins/passwordauth/discussion/]], but this is Apache-centric and enabling `mod_perl` just for auth seems overkill.
+
+Moreover, when ikiwiki is just a part of a wider web project, we may want
+to use the same userdb for the other parts of this project.
+
+I think an ikiwiki plugin which would (re)generate an htpasswd version of
+the user/passwd base (better, two htpasswd files, one with only the wiki
+admins and one with everyone) each time an user is added or modified would
+solve this problem:
+
+* access control can be managed from the web server
+* user management is handled by the passwordauth plugin
+* htpasswd format is understood by various servers (Apache, lighttpd, nginx, ...) and languages commonly used for web development (perl, python, ruby)
+* htpasswd files can be mirrored on other machines when the web site is distributed
+
+-- [[nil]]
+
+> I think this is a good idea. Although unless the password hashes that
+> are stored in the userdb are compatible with htpasswd hashes,
+> the htpasswd hashes will need to be stored in the userdb too. Then
+> any userdb change can just regenerate the htpasswd file, dumping out
+> the right kind of hashes. --[[Joey]]
}
}
-IkiWiki::rcs_commit_staged(gettext("calendar update"), undef, undef)
+IkiWiki::rcs_commit_staged(message => gettext("calendar update"))
if $config{rcs};
exec("ikiwiki", "-setup", $setup, "-refresh");
Name: ikiwiki
-Version: 3.20100609
+Version: 3.20100624
Release: 1%{?dist}
Summary: A wiki compiler
msgstr ""
"Project-Id-Version: ikiwiki-gu\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-18 13:38-0400\n"
+"POT-Creation-Date: 2010-06-10 15:02-0400\n"
"PO-Revision-Date: 2007-01-11 16:05+0530\n"
"Last-Translator: Kartik Mistry <kartik.mistry@gmail.com>\n"
"Language-Team: Gujarati <team@utkarsh.org>\n"
+"Language: gu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "comments on page '%s' are closed"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:490
+#: ../IkiWiki/Plugin/comments.pm:491
msgid "comment stored for moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:492
+#: ../IkiWiki/Plugin/comments.pm:493
msgid "Your comment will be posted after moderator review"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:505
+#: ../IkiWiki/Plugin/comments.pm:506
msgid "Added a comment"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:509
+#: ../IkiWiki/Plugin/comments.pm:510
#, perl-format
msgid "Added a comment: %s"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:551 ../IkiWiki/Plugin/websetup.pm:272
+#: ../IkiWiki/Plugin/comments.pm:552 ../IkiWiki/Plugin/websetup.pm:272
msgid "you are not logged in as an admin"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:602
+#: ../IkiWiki/Plugin/comments.pm:603
msgid "Comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:640
+#: ../IkiWiki/Plugin/comments.pm:641
msgid "comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:789
+#: ../IkiWiki/Plugin/comments.pm:790
#, perl-format
msgid "%i comment"
msgid_plural "%i comments"
#. translators: Here "Comment" is a verb;
#. translators: the user clicks on it to
#. translators: post a comment.
-#: ../IkiWiki/Plugin/comments.pm:799
+#: ../IkiWiki/Plugin/comments.pm:800
msgid "Comment"
msgstr ""
msgid "creating %s"
msgstr "%s બનાવે છે"
-#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:331
-#: ../IkiWiki/Plugin/editpage.pm:341 ../IkiWiki/Plugin/editpage.pm:385
-#: ../IkiWiki/Plugin/editpage.pm:424
+#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:334
+#: ../IkiWiki/Plugin/editpage.pm:345 ../IkiWiki/Plugin/editpage.pm:390
+#: ../IkiWiki/Plugin/editpage.pm:429
#, perl-format
msgid "editing %s"
msgstr "%s સુધારે છે"
msgid "failed to run graphviz"
msgstr "ગ્રાફવિઝ ચલાવવામાં નિષ્ફળ"
-#: ../IkiWiki/Plugin/graphviz.pm:90
+#: ../IkiWiki/Plugin/graphviz.pm:91
msgid "prog not a valid graphviz program"
msgstr "કાર્યક્રમએ યોગ્ય ગ્રાફવિઝ કાર્યક્રમ નથી"
msgid "wrong size format \"%s\" (should be WxH)"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:125
+#: ../IkiWiki/Plugin/img.pm:122
#, perl-format
msgid "failed to resize: %s"
msgstr "માપ બદલવામાં નિષ્ફળ: %s"
-#: ../IkiWiki/Plugin/img.pm:145
+#: ../IkiWiki/Plugin/img.pm:146
#, fuzzy, perl-format
msgid "failed to determine size of image %s"
msgstr "માપ બદલવામાં નિષ્ફળ: %s"
msgid "cannot load %s in safe mode"
msgstr "વાંચી શકાતી નથી %s: %s"
-#: ../IkiWiki/Setup.pm:46
+#: ../IkiWiki/Setup.pm:47
#, fuzzy, perl-format
msgid "failed to parse %s"
msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ"
msgid "preprocessing loop detected on %s at depth %i"
msgstr "%s પર શોધાયેલ લુપ %s પર ચલાવે છે %i ઉંડાણ પર"
-#: ../IkiWiki.pm:1984
+#: ../IkiWiki.pm:1993
msgid "yes"
msgstr ""
-#: ../IkiWiki.pm:2061
+#: ../IkiWiki.pm:2070
#, fuzzy, perl-format
msgid "invalid sort type %s"
msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s"
-#: ../IkiWiki.pm:2082
+#: ../IkiWiki.pm:2091
#, perl-format
msgid "unknown sort type %s"
msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s"
-#: ../IkiWiki.pm:2218
+#: ../IkiWiki.pm:2227
#, fuzzy, perl-format
msgid "cannot match pages: %s"
msgstr "વાંચી શકાતી નથી %s: %s"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-18 14:18-0400\n"
+"POT-Creation-Date: 2010-06-23 17:10-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "You are banned."
msgstr ""
-#: ../IkiWiki/CGI.pm:426 ../IkiWiki/CGI.pm:427 ../IkiWiki.pm:1316
+#: ../IkiWiki/CGI.pm:426 ../IkiWiki/CGI.pm:427 ../IkiWiki.pm:1317
msgid "Error"
msgstr ""
msgid "prohibited by allowed_attachments"
msgstr ""
-#: ../IkiWiki/Plugin/attachment.pm:141
+#: ../IkiWiki/Plugin/attachment.pm:144
msgid "bad attachment filename"
msgstr ""
-#: ../IkiWiki/Plugin/attachment.pm:183
+#: ../IkiWiki/Plugin/attachment.pm:188
msgid "attachment upload"
msgstr ""
-#: ../IkiWiki/Plugin/autoindex.pm:117
+#: ../IkiWiki/Plugin/autoindex.pm:120
msgid "automatic index generation"
msgstr ""
-#: ../IkiWiki/Plugin/blogspam.pm:109
+#: ../IkiWiki/Plugin/blogspam.pm:110
msgid ""
"Sorry, but that looks like spam to <a href=\"http://blogspam.net/"
"\">blogspam</a>: "
msgid "comments on page '%s' are closed"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:490
+#: ../IkiWiki/Plugin/comments.pm:491
msgid "comment stored for moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:492
+#: ../IkiWiki/Plugin/comments.pm:493
msgid "Your comment will be posted after moderator review"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:505
+#: ../IkiWiki/Plugin/comments.pm:506
msgid "Added a comment"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:509
+#: ../IkiWiki/Plugin/comments.pm:510
#, perl-format
msgid "Added a comment: %s"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:551 ../IkiWiki/Plugin/websetup.pm:272
+#: ../IkiWiki/Plugin/comments.pm:554 ../IkiWiki/Plugin/websetup.pm:268
msgid "you are not logged in as an admin"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:602
+#: ../IkiWiki/Plugin/comments.pm:605
msgid "Comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:640
+#: ../IkiWiki/Plugin/comments.pm:645
msgid "comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:789
+#: ../IkiWiki/Plugin/comments.pm:802
#, perl-format
msgid "%i comment"
msgid_plural "%i comments"
#. translators: Here "Comment" is a verb;
#. translators: the user clicks on it to
#. translators: post a comment.
-#: ../IkiWiki/Plugin/comments.pm:799
+#: ../IkiWiki/Plugin/comments.pm:812
msgid "Comment"
msgstr ""
msgid "creating %s"
msgstr ""
-#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:331
-#: ../IkiWiki/Plugin/editpage.pm:341 ../IkiWiki/Plugin/editpage.pm:385
-#: ../IkiWiki/Plugin/editpage.pm:424
+#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:332
+#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:388
+#: ../IkiWiki/Plugin/editpage.pm:430
#, perl-format
msgid "editing %s"
msgstr ""
msgid "match not specified"
msgstr ""
-#: ../IkiWiki/Plugin/edittemplate.pm:64
+#: ../IkiWiki/Plugin/edittemplate.pm:70
#, perl-format
msgid "edittemplate %s registered for %s"
msgstr ""
-#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339
+#: ../IkiWiki/Plugin/edittemplate.pm:131 ../IkiWiki/Plugin/inline.pm:339
#: ../IkiWiki/Plugin/template.pm:44
msgid "failed to process template:"
msgstr ""
msgid "%s is an attachment, not a page."
msgstr ""
-#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705
-#: ../IkiWiki/Receive.pm:130
+#: ../IkiWiki/Plugin/git.pm:724 ../IkiWiki/Plugin/git.pm:742
+#: ../IkiWiki/Receive.pm:129
#, perl-format
msgid "you are not allowed to change %s"
msgstr ""
-#: ../IkiWiki/Plugin/git.pm:727
+#: ../IkiWiki/Plugin/git.pm:764
#, perl-format
msgid "you cannot act on a file with mode %s"
msgstr ""
-#: ../IkiWiki/Plugin/git.pm:731
+#: ../IkiWiki/Plugin/git.pm:768
msgid "you are not allowed to change file modes"
msgstr ""
msgid "failed to run graphviz"
msgstr ""
-#: ../IkiWiki/Plugin/graphviz.pm:90
+#: ../IkiWiki/Plugin/graphviz.pm:91
msgid "prog not a valid graphviz program"
msgstr ""
msgid "wrong size format \"%s\" (should be WxH)"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:125
+#: ../IkiWiki/Plugin/img.pm:122
#, perl-format
msgid "failed to resize: %s"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:145
+#: ../IkiWiki/Plugin/img.pm:146
#, perl-format
msgid "failed to determine size of image %s"
msgstr ""
msgid "more"
msgstr ""
-#: ../IkiWiki/Plugin/openid.pm:58
+#: ../IkiWiki/Plugin/openid.pm:70
#, perl-format
msgid "failed to load openid module: "
msgstr ""
msgid "rebuilding all pages to fix meta titles"
msgstr ""
-#: ../IkiWiki/Plugin/po.pm:394 ../IkiWiki/Render.pm:769
+#: ../IkiWiki/Plugin/po.pm:394 ../IkiWiki/Render.pm:784
#, perl-format
msgid "building %s"
msgstr ""
msgid "updated PO files"
msgstr ""
-#: ../IkiWiki/Plugin/po.pm:456
+#: ../IkiWiki/Plugin/po.pm:455
msgid ""
"Can not remove a translation. If the master page is removed, however, its "
"translations will be removed as well."
msgstr ""
-#: ../IkiWiki/Plugin/po.pm:476
+#: ../IkiWiki/Plugin/po.pm:475
msgid ""
"Can not rename a translation. If the master page is renamed, however, its "
"translations will be renamed as well."
msgstr ""
-#: ../IkiWiki/Plugin/po.pm:876
+#: ../IkiWiki/Plugin/po.pm:875
#, perl-format
msgid "POT file (%s) does not exist"
msgstr ""
-#: ../IkiWiki/Plugin/po.pm:890
+#: ../IkiWiki/Plugin/po.pm:889
#, perl-format
msgid "failed to copy underlay PO file to %s"
msgstr ""
-#: ../IkiWiki/Plugin/po.pm:899
+#: ../IkiWiki/Plugin/po.pm:898
#, perl-format
msgid "failed to update %s"
msgstr ""
-#: ../IkiWiki/Plugin/po.pm:905
+#: ../IkiWiki/Plugin/po.pm:904
#, perl-format
msgid "failed to copy the POT file to %s"
msgstr ""
-#: ../IkiWiki/Plugin/po.pm:941
+#: ../IkiWiki/Plugin/po.pm:940
msgid "N/A"
msgstr ""
-#: ../IkiWiki/Plugin/po.pm:954
+#: ../IkiWiki/Plugin/po.pm:953
#, perl-format
msgid "failed to translate %s"
msgstr ""
-#: ../IkiWiki/Plugin/po.pm:1038
+#: ../IkiWiki/Plugin/po.pm:1037
msgid "removed obsolete PO files"
msgstr ""
msgid "Please select the attachments to remove."
msgstr ""
-#: ../IkiWiki/Plugin/remove.pm:216
+#: ../IkiWiki/Plugin/remove.pm:217
msgid "removed"
msgstr ""
msgid "rename %s to %s"
msgstr ""
-#: ../IkiWiki/Plugin/rename.pm:576
+#: ../IkiWiki/Plugin/rename.pm:577
#, perl-format
msgid "update for rename of %s to %s"
msgstr ""
msgid "enable %s?"
msgstr ""
-#: ../IkiWiki/Plugin/websetup.pm:276
+#: ../IkiWiki/Plugin/websetup.pm:272
msgid "setup file for this wiki is not known"
msgstr ""
-#: ../IkiWiki/Plugin/websetup.pm:292
+#: ../IkiWiki/Plugin/websetup.pm:288
msgid "main"
msgstr ""
-#: ../IkiWiki/Plugin/websetup.pm:435
+#: ../IkiWiki/Plugin/websetup.pm:431
msgid ""
"The configuration changes shown below require a wiki rebuild to take effect."
msgstr ""
-#: ../IkiWiki/Plugin/websetup.pm:439
+#: ../IkiWiki/Plugin/websetup.pm:435
msgid ""
"For the configuration changes shown below to fully take effect, you may need "
"to rebuild the wiki."
msgstr ""
-#: ../IkiWiki/Plugin/websetup.pm:476
+#: ../IkiWiki/Plugin/websetup.pm:472
#, perl-format
msgid "Error: %s exited nonzero (%s). Discarding setup changes."
msgstr ""
msgid "cannot determine id of untrusted committer %s"
msgstr ""
-#: ../IkiWiki/Receive.pm:86
+#: ../IkiWiki/Receive.pm:85
#, perl-format
msgid "bad file name %s"
msgstr ""
"allow this"
msgstr ""
-#: ../IkiWiki/Render.pm:311
+#: ../IkiWiki/Render.pm:316
#, perl-format
msgid "skipping bad filename %s"
msgstr ""
-#: ../IkiWiki/Render.pm:327
+#: ../IkiWiki/Render.pm:332
#, perl-format
msgid "%s has multiple possible source pages"
msgstr ""
-#: ../IkiWiki/Render.pm:369
+#: ../IkiWiki/Render.pm:372
#, perl-format
msgid "querying %s for file creation and modification times.."
msgstr ""
-#: ../IkiWiki/Render.pm:431
+#: ../IkiWiki/Render.pm:446
#, perl-format
msgid "removing obsolete %s"
msgstr ""
-#: ../IkiWiki/Render.pm:505
+#: ../IkiWiki/Render.pm:520
#, perl-format
msgid "building %s, which links to %s"
msgstr ""
-#: ../IkiWiki/Render.pm:514
+#: ../IkiWiki/Render.pm:529
#, perl-format
msgid "removing %s, no longer built by %s"
msgstr ""
-#: ../IkiWiki/Render.pm:597 ../IkiWiki/Render.pm:679
+#: ../IkiWiki/Render.pm:612 ../IkiWiki/Render.pm:694
#, perl-format
msgid "building %s, which depends on %s"
msgstr ""
-#: ../IkiWiki/Render.pm:692
+#: ../IkiWiki/Render.pm:707
#, perl-format
msgid "building %s, to update its backlinks"
msgstr ""
-#: ../IkiWiki/Render.pm:821
+#: ../IkiWiki/Render.pm:836
#, perl-format
msgid "ikiwiki: cannot build %s"
msgstr ""
msgid "cannot load %s in safe mode"
msgstr ""
-#: ../IkiWiki/Setup.pm:46
+#: ../IkiWiki/Setup.pm:47
#, perl-format
msgid "failed to parse %s"
msgstr ""
msgid "cannot use multiple rcs plugins"
msgstr ""
-#: ../IkiWiki.pm:606
+#: ../IkiWiki.pm:607
#, perl-format
msgid "failed to load external plugin needed for %s plugin: %s"
msgstr ""
-#: ../IkiWiki.pm:1298
+#: ../IkiWiki.pm:1299
#, perl-format
msgid "preprocessing loop detected on %s at depth %i"
msgstr ""
-#: ../IkiWiki.pm:1984
+#: ../IkiWiki.pm:1994
msgid "yes"
msgstr ""
-#: ../IkiWiki.pm:2061
+#: ../IkiWiki.pm:2071
#, perl-format
msgid "invalid sort type %s"
msgstr ""
-#: ../IkiWiki.pm:2082
+#: ../IkiWiki.pm:2092
#, perl-format
msgid "unknown sort type %s"
msgstr ""
-#: ../IkiWiki.pm:2218
+#: ../IkiWiki.pm:2228
#, perl-format
msgid "cannot match pages: %s"
msgstr ""
msgstr ""
"Project-Id-Version: Ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-18 13:38-0400\n"
+"POT-Creation-Date: 2010-06-10 15:02-0400\n"
"PO-Revision-Date: 2009-08-16 11:01+0100\n"
"Last-Translator: Luca Bruno <lucab@debian.org>\n"
"Language-Team: Italian TP <tp@lists.linux.it>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "comments on page '%s' are closed"
msgstr "i commenti per la pagina «%s» sono chiusi"
-#: ../IkiWiki/Plugin/comments.pm:490
+#: ../IkiWiki/Plugin/comments.pm:491
msgid "comment stored for moderation"
msgstr "commento trattenuto per moderazione"
-#: ../IkiWiki/Plugin/comments.pm:492
+#: ../IkiWiki/Plugin/comments.pm:493
msgid "Your comment will be posted after moderator review"
msgstr "Il commento sarà pubblicato dopo la verifica del moderatore"
-#: ../IkiWiki/Plugin/comments.pm:505
+#: ../IkiWiki/Plugin/comments.pm:506
msgid "Added a comment"
msgstr "Aggiunto commento"
-#: ../IkiWiki/Plugin/comments.pm:509
+#: ../IkiWiki/Plugin/comments.pm:510
#, perl-format
msgid "Added a comment: %s"
msgstr "Aggiunto commento: %s"
-#: ../IkiWiki/Plugin/comments.pm:551 ../IkiWiki/Plugin/websetup.pm:272
+#: ../IkiWiki/Plugin/comments.pm:552 ../IkiWiki/Plugin/websetup.pm:272
msgid "you are not logged in as an admin"
msgstr "non siete autenticati come amministratore"
-#: ../IkiWiki/Plugin/comments.pm:602
+#: ../IkiWiki/Plugin/comments.pm:603
msgid "Comment moderation"
msgstr "Moderazione commenti"
-#: ../IkiWiki/Plugin/comments.pm:640
+#: ../IkiWiki/Plugin/comments.pm:641
msgid "comment moderation"
msgstr "moderazione commento"
-#: ../IkiWiki/Plugin/comments.pm:789
+#: ../IkiWiki/Plugin/comments.pm:790
#, fuzzy, perl-format
msgid "%i comment"
msgid_plural "%i comments"
#. translators: Here "Comment" is a verb;
#. translators: the user clicks on it to
#. translators: post a comment.
-#: ../IkiWiki/Plugin/comments.pm:799
+#: ../IkiWiki/Plugin/comments.pm:800
#, fuzzy
msgid "Comment"
msgstr "Commenti"
msgid "creating %s"
msgstr "creazione %s"
-#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:331
-#: ../IkiWiki/Plugin/editpage.pm:341 ../IkiWiki/Plugin/editpage.pm:385
-#: ../IkiWiki/Plugin/editpage.pm:424
+#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:334
+#: ../IkiWiki/Plugin/editpage.pm:345 ../IkiWiki/Plugin/editpage.pm:390
+#: ../IkiWiki/Plugin/editpage.pm:429
#, perl-format
msgid "editing %s"
msgstr "modifica %s"
msgid "failed to run graphviz"
msgstr "errore nell'eseguire graphviz"
-#: ../IkiWiki/Plugin/graphviz.pm:90
+#: ../IkiWiki/Plugin/graphviz.pm:91
msgid "prog not a valid graphviz program"
msgstr "prog non è un programma graphviz valido"
msgid "wrong size format \"%s\" (should be WxH)"
msgstr "Formato dimensione «%s» non valido (dovrebbe essere LxA)"
-#: ../IkiWiki/Plugin/img.pm:125
+#: ../IkiWiki/Plugin/img.pm:122
#, perl-format
msgid "failed to resize: %s"
msgstr "impossibile ridimensionare: %s"
-#: ../IkiWiki/Plugin/img.pm:145
+#: ../IkiWiki/Plugin/img.pm:146
#, perl-format
msgid "failed to determine size of image %s"
msgstr "impossibile determinare la dimensione dell'immagine %s"
msgid "cannot load %s in safe mode"
msgstr "impossibile leggere %s: %s"
-#: ../IkiWiki/Setup.pm:46
+#: ../IkiWiki/Setup.pm:47
#, fuzzy, perl-format
msgid "failed to parse %s"
msgstr "impossibile aggiornare %s"
msgid "preprocessing loop detected on %s at depth %i"
msgstr "ciclo del preprocessore individuato su %s alla profondità %i"
-#: ../IkiWiki.pm:1984
+#: ../IkiWiki.pm:1993
msgid "yes"
msgstr "sì"
-#: ../IkiWiki.pm:2061
+#: ../IkiWiki.pm:2070
#, fuzzy, perl-format
msgid "invalid sort type %s"
msgstr "ordinamento %s sconosciuto"
-#: ../IkiWiki.pm:2082
+#: ../IkiWiki.pm:2091
#, perl-format
msgid "unknown sort type %s"
msgstr "ordinamento %s sconosciuto"
-#: ../IkiWiki.pm:2218
+#: ../IkiWiki.pm:2227
#, perl-format
msgid "cannot match pages: %s"
msgstr "impossibile trovare pagine corrispondenti: %s"
msgstr ""
"Project-Id-Version: ikiwiki 1.51\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-18 13:38-0400\n"
+"POT-Creation-Date: 2010-06-10 15:02-0400\n"
"PO-Revision-Date: 2007-04-27 22:05+0200\n"
"Last-Translator: Pawel Tecza <ptecza@net.icm.edu.pl>\n"
"Language-Team: Debian L10n Polish <debian-l10n-polish@lists.debian.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "comments on page '%s' are closed"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:490
+#: ../IkiWiki/Plugin/comments.pm:491
msgid "comment stored for moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:492
+#: ../IkiWiki/Plugin/comments.pm:493
msgid "Your comment will be posted after moderator review"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:505
+#: ../IkiWiki/Plugin/comments.pm:506
msgid "Added a comment"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:509
+#: ../IkiWiki/Plugin/comments.pm:510
#, perl-format
msgid "Added a comment: %s"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:551 ../IkiWiki/Plugin/websetup.pm:272
+#: ../IkiWiki/Plugin/comments.pm:552 ../IkiWiki/Plugin/websetup.pm:272
msgid "you are not logged in as an admin"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:602
+#: ../IkiWiki/Plugin/comments.pm:603
msgid "Comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:640
+#: ../IkiWiki/Plugin/comments.pm:641
msgid "comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:789
+#: ../IkiWiki/Plugin/comments.pm:790
#, perl-format
msgid "%i comment"
msgid_plural "%i comments"
#. translators: Here "Comment" is a verb;
#. translators: the user clicks on it to
#. translators: post a comment.
-#: ../IkiWiki/Plugin/comments.pm:799
+#: ../IkiWiki/Plugin/comments.pm:800
msgid "Comment"
msgstr ""
msgid "creating %s"
msgstr "tworzenie %s"
-#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:331
-#: ../IkiWiki/Plugin/editpage.pm:341 ../IkiWiki/Plugin/editpage.pm:385
-#: ../IkiWiki/Plugin/editpage.pm:424
+#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:334
+#: ../IkiWiki/Plugin/editpage.pm:345 ../IkiWiki/Plugin/editpage.pm:390
+#: ../IkiWiki/Plugin/editpage.pm:429
#, perl-format
msgid "editing %s"
msgstr "edycja %s"
msgid "failed to run graphviz"
msgstr "awaria w trakcie uruchamiania wtyczki graphviz"
-#: ../IkiWiki/Plugin/graphviz.pm:90
+#: ../IkiWiki/Plugin/graphviz.pm:91
msgid "prog not a valid graphviz program"
msgstr "prog nie jest poprawnym programem graphviz"
msgid "wrong size format \"%s\" (should be WxH)"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:125
+#: ../IkiWiki/Plugin/img.pm:122
#, fuzzy, perl-format
msgid "failed to resize: %s"
msgstr "awaria w trakcie zmiany rozmiaru: %s"
-#: ../IkiWiki/Plugin/img.pm:145
+#: ../IkiWiki/Plugin/img.pm:146
#, fuzzy, perl-format
msgid "failed to determine size of image %s"
msgstr "awaria w trakcie zmiany rozmiaru: %s"
msgid "cannot load %s in safe mode"
msgstr "awaria w trakcie odczytu %s: %s"
-#: ../IkiWiki/Setup.pm:46
+#: ../IkiWiki/Setup.pm:47
#, fuzzy, perl-format
msgid "failed to parse %s"
msgstr "awaria w trakcie kompilowania %s"
msgid "preprocessing loop detected on %s at depth %i"
msgstr "polecenie preprocesora %s wykryte w %s na głębokości %i"
-#: ../IkiWiki.pm:1984
+#: ../IkiWiki.pm:1993
msgid "yes"
msgstr ""
-#: ../IkiWiki.pm:2061
+#: ../IkiWiki.pm:2070
#, fuzzy, perl-format
msgid "invalid sort type %s"
msgstr "nieznany sposób sortowania %s"
-#: ../IkiWiki.pm:2082
+#: ../IkiWiki.pm:2091
#, perl-format
msgid "unknown sort type %s"
msgstr "nieznany sposób sortowania %s"
-#: ../IkiWiki.pm:2218
+#: ../IkiWiki.pm:2227
#, fuzzy, perl-format
msgid "cannot match pages: %s"
msgstr "awaria w trakcie odczytu %s: %s"
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-18 13:38-0400\n"
+"POT-Creation-Date: 2010-06-10 15:02-0400\n"
"PO-Revision-Date: 2007-01-10 23:47+0100\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
+"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "comments on page '%s' are closed"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:490
+#: ../IkiWiki/Plugin/comments.pm:491
msgid "comment stored for moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:492
+#: ../IkiWiki/Plugin/comments.pm:493
msgid "Your comment will be posted after moderator review"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:505
+#: ../IkiWiki/Plugin/comments.pm:506
msgid "Added a comment"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:509
+#: ../IkiWiki/Plugin/comments.pm:510
#, perl-format
msgid "Added a comment: %s"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:551 ../IkiWiki/Plugin/websetup.pm:272
+#: ../IkiWiki/Plugin/comments.pm:552 ../IkiWiki/Plugin/websetup.pm:272
msgid "you are not logged in as an admin"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:602
+#: ../IkiWiki/Plugin/comments.pm:603
msgid "Comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:640
+#: ../IkiWiki/Plugin/comments.pm:641
msgid "comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:789
+#: ../IkiWiki/Plugin/comments.pm:790
#, perl-format
msgid "%i comment"
msgid_plural "%i comments"
#. translators: Here "Comment" is a verb;
#. translators: the user clicks on it to
#. translators: post a comment.
-#: ../IkiWiki/Plugin/comments.pm:799
+#: ../IkiWiki/Plugin/comments.pm:800
msgid "Comment"
msgstr ""
msgid "creating %s"
msgstr "skapar %s"
-#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:331
-#: ../IkiWiki/Plugin/editpage.pm:341 ../IkiWiki/Plugin/editpage.pm:385
-#: ../IkiWiki/Plugin/editpage.pm:424
+#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:334
+#: ../IkiWiki/Plugin/editpage.pm:345 ../IkiWiki/Plugin/editpage.pm:390
+#: ../IkiWiki/Plugin/editpage.pm:429
#, perl-format
msgid "editing %s"
msgstr "redigerar %s"
msgid "failed to run graphviz"
msgstr "linkmap misslyckades att köra dot"
-#: ../IkiWiki/Plugin/graphviz.pm:90
+#: ../IkiWiki/Plugin/graphviz.pm:91
msgid "prog not a valid graphviz program"
msgstr ""
msgid "wrong size format \"%s\" (should be WxH)"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:125
+#: ../IkiWiki/Plugin/img.pm:122
#, fuzzy, perl-format
msgid "failed to resize: %s"
msgstr "misslyckades med att skriva %s: %s"
-#: ../IkiWiki/Plugin/img.pm:145
+#: ../IkiWiki/Plugin/img.pm:146
#, fuzzy, perl-format
msgid "failed to determine size of image %s"
msgstr "misslyckades med att skriva %s: %s"
msgid "cannot load %s in safe mode"
msgstr "kan inte läsa %s: %s"
-#: ../IkiWiki/Setup.pm:46
+#: ../IkiWiki/Setup.pm:47
#, fuzzy, perl-format
msgid "failed to parse %s"
msgstr "misslyckades med att kompilera %s"
msgid "preprocessing loop detected on %s at depth %i"
msgstr "%s förbehandlingsslinga detekterades på %s, djup %i"
-#: ../IkiWiki.pm:1984
+#: ../IkiWiki.pm:1993
msgid "yes"
msgstr ""
-#: ../IkiWiki.pm:2061
+#: ../IkiWiki.pm:2070
#, fuzzy, perl-format
msgid "invalid sort type %s"
msgstr "okänd sorteringstyp %s"
-#: ../IkiWiki.pm:2082
+#: ../IkiWiki.pm:2091
#, perl-format
msgid "unknown sort type %s"
msgstr "okänd sorteringstyp %s"
-#: ../IkiWiki.pm:2218
+#: ../IkiWiki.pm:2227
#, fuzzy, perl-format
msgid "cannot match pages: %s"
msgstr "kan inte läsa %s: %s"
msgstr ""
"Project-Id-Version: ikiwiki 3.20091031\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-18 13:38-0400\n"
+"POT-Creation-Date: 2010-06-10 15:02-0400\n"
"PO-Revision-Date: 2009-11-08 03:04+0200\n"
"Last-Translator: Recai Oktaş <roktas@debian.org>\n"
"Language-Team: Turkish <debian-l10n-turkish@lists.debian.org>\n"
+"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "comments on page '%s' are closed"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:490
+#: ../IkiWiki/Plugin/comments.pm:491
msgid "comment stored for moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:492
+#: ../IkiWiki/Plugin/comments.pm:493
msgid "Your comment will be posted after moderator review"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:505
+#: ../IkiWiki/Plugin/comments.pm:506
msgid "Added a comment"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:509
+#: ../IkiWiki/Plugin/comments.pm:510
#, perl-format
msgid "Added a comment: %s"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:551 ../IkiWiki/Plugin/websetup.pm:272
+#: ../IkiWiki/Plugin/comments.pm:552 ../IkiWiki/Plugin/websetup.pm:272
msgid "you are not logged in as an admin"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:602
+#: ../IkiWiki/Plugin/comments.pm:603
msgid "Comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:640
+#: ../IkiWiki/Plugin/comments.pm:641
msgid "comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:789
+#: ../IkiWiki/Plugin/comments.pm:790
#, perl-format
msgid "%i comment"
msgid_plural "%i comments"
#. translators: Here "Comment" is a verb;
#. translators: the user clicks on it to
#. translators: post a comment.
-#: ../IkiWiki/Plugin/comments.pm:799
+#: ../IkiWiki/Plugin/comments.pm:800
msgid "Comment"
msgstr ""
msgid "creating %s"
msgstr ""
-#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:331
-#: ../IkiWiki/Plugin/editpage.pm:341 ../IkiWiki/Plugin/editpage.pm:385
-#: ../IkiWiki/Plugin/editpage.pm:424
+#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:334
+#: ../IkiWiki/Plugin/editpage.pm:345 ../IkiWiki/Plugin/editpage.pm:390
+#: ../IkiWiki/Plugin/editpage.pm:429
#, perl-format
msgid "editing %s"
msgstr ""
msgid "failed to run graphviz"
msgstr ""
-#: ../IkiWiki/Plugin/graphviz.pm:90
+#: ../IkiWiki/Plugin/graphviz.pm:91
msgid "prog not a valid graphviz program"
msgstr ""
msgid "wrong size format \"%s\" (should be WxH)"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:125
+#: ../IkiWiki/Plugin/img.pm:122
#, perl-format
msgid "failed to resize: %s"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:145
+#: ../IkiWiki/Plugin/img.pm:146
#, perl-format
msgid "failed to determine size of image %s"
msgstr ""
msgid "cannot load %s in safe mode"
msgstr ""
-#: ../IkiWiki/Setup.pm:46
+#: ../IkiWiki/Setup.pm:47
#, perl-format
msgid "failed to parse %s"
msgstr ""
msgid "preprocessing loop detected on %s at depth %i"
msgstr ""
-#: ../IkiWiki.pm:1984
+#: ../IkiWiki.pm:1993
msgid "yes"
msgstr ""
-#: ../IkiWiki.pm:2061
+#: ../IkiWiki.pm:2070
#, perl-format
msgid "invalid sort type %s"
msgstr ""
-#: ../IkiWiki.pm:2082
+#: ../IkiWiki.pm:2091
#, perl-format
msgid "unknown sort type %s"
msgstr ""
-#: ../IkiWiki.pm:2218
+#: ../IkiWiki.pm:2227
#, perl-format
msgid "cannot match pages: %s"
msgstr ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-05-18 13:38-0400\n"
+"POT-Creation-Date: 2010-06-10 15:02-0400\n"
"PO-Revision-Date: 2007-01-13 15:31+1030\n"
"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
+"Language: vi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "comments on page '%s' are closed"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:490
+#: ../IkiWiki/Plugin/comments.pm:491
msgid "comment stored for moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:492
+#: ../IkiWiki/Plugin/comments.pm:493
msgid "Your comment will be posted after moderator review"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:505
+#: ../IkiWiki/Plugin/comments.pm:506
msgid "Added a comment"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:509
+#: ../IkiWiki/Plugin/comments.pm:510
#, perl-format
msgid "Added a comment: %s"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:551 ../IkiWiki/Plugin/websetup.pm:272
+#: ../IkiWiki/Plugin/comments.pm:552 ../IkiWiki/Plugin/websetup.pm:272
msgid "you are not logged in as an admin"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:602
+#: ../IkiWiki/Plugin/comments.pm:603
msgid "Comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:640
+#: ../IkiWiki/Plugin/comments.pm:641
msgid "comment moderation"
msgstr ""
-#: ../IkiWiki/Plugin/comments.pm:789
+#: ../IkiWiki/Plugin/comments.pm:790
#, perl-format
msgid "%i comment"
msgid_plural "%i comments"
#. translators: Here "Comment" is a verb;
#. translators: the user clicks on it to
#. translators: post a comment.
-#: ../IkiWiki/Plugin/comments.pm:799
+#: ../IkiWiki/Plugin/comments.pm:800
msgid "Comment"
msgstr ""
msgid "creating %s"
msgstr "đang tạo %s"
-#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:331
-#: ../IkiWiki/Plugin/editpage.pm:341 ../IkiWiki/Plugin/editpage.pm:385
-#: ../IkiWiki/Plugin/editpage.pm:424
+#: ../IkiWiki/Plugin/editpage.pm:312 ../IkiWiki/Plugin/editpage.pm:334
+#: ../IkiWiki/Plugin/editpage.pm:345 ../IkiWiki/Plugin/editpage.pm:390
+#: ../IkiWiki/Plugin/editpage.pm:429
#, perl-format
msgid "editing %s"
msgstr "đang sửa %s"
msgid "failed to run graphviz"
msgstr "linkmap không chạy dot được"
-#: ../IkiWiki/Plugin/graphviz.pm:90
+#: ../IkiWiki/Plugin/graphviz.pm:91
msgid "prog not a valid graphviz program"
msgstr ""
msgid "wrong size format \"%s\" (should be WxH)"
msgstr ""
-#: ../IkiWiki/Plugin/img.pm:125
+#: ../IkiWiki/Plugin/img.pm:122
#, fuzzy, perl-format
msgid "failed to resize: %s"
msgstr "lỗi ghi %s: %s"
-#: ../IkiWiki/Plugin/img.pm:145
+#: ../IkiWiki/Plugin/img.pm:146
#, fuzzy, perl-format
msgid "failed to determine size of image %s"
msgstr "lỗi ghi %s: %s"
#: ../IkiWiki/Plugin/inline.pm:93
msgid "Must specify url to wiki with --url when using --rss or --atom"
msgstr ""
-"Cần phải xác định địa chỉ URL tới wiki với « --url » khi dùng « --rss » hay « --"
-"atom »"
+"Cần phải xác định địa chỉ URL tới wiki với « --url » khi dùng « --rss » hay "
+"« --atom »"
#: ../IkiWiki/Plugin/inline.pm:139
#, fuzzy
msgid "cannot load %s in safe mode"
msgstr "không thể đọc %s: %s"
-#: ../IkiWiki/Setup.pm:46
+#: ../IkiWiki/Setup.pm:47
#, fuzzy, perl-format
msgid "failed to parse %s"
msgstr "lỗi biên dịch %s"
#: ../IkiWiki.pm:531
msgid "Must specify url to wiki with --url when using --cgi"
-msgstr "Cần phải xác định địa chỉ URL tới wiki với « --url » khi dùng « --cgi »"
+msgstr ""
+"Cần phải xác định địa chỉ URL tới wiki với « --url » khi dùng « --cgi »"
#: ../IkiWiki.pm:577
msgid "cannot use multiple rcs plugins"
msgid "preprocessing loop detected on %s at depth %i"
msgstr "vòng lặp tiền xử lý %s được phát hiện trên %s ở độ sâu %i"
-#: ../IkiWiki.pm:1984
+#: ../IkiWiki.pm:1993
msgid "yes"
msgstr ""
-#: ../IkiWiki.pm:2061
+#: ../IkiWiki.pm:2070
#, fuzzy, perl-format
msgid "invalid sort type %s"
msgstr "kiểu sắp xếp không rõ %s"
-#: ../IkiWiki.pm:2082
+#: ../IkiWiki.pm:2091
#, perl-format
msgid "unknown sort type %s"
msgstr "kiểu sắp xếp không rõ %s"
-#: ../IkiWiki.pm:2218
+#: ../IkiWiki.pm:2227
#, fuzzy, perl-format
msgid "cannot match pages: %s"
msgstr "không thể đọc %s: %s"
system "bzr init $config{srcdir}";
+use CGI::Session;
+my $session=CGI::Session->new;
+$session->param("name", "Joe User");
+
# Web commit
my $test1 = readfile("t/test1.mdwn");
writefile('test1.mdwn', $config{srcdir}, $test1);
IkiWiki::rcs_add("test1.mdwn");
-IkiWiki::rcs_commit("test1.mdwn", "Added the first page", "moo", "Joe User");
+IkiWiki::rcs_commit(
+ file => "test1.mdwn",
+ message => "Added the first page",
+ token => "moo",
+ session => $session);
my @changes;
@changes = IkiWiki::rcs_recentchanges(3);
writefile('test3.mdwn', $config{srcdir}, $test1);
IkiWiki::rcs_add("test3.mdwn");
IkiWiki::rcs_rename("test3.mdwn", "test4.mdwn");
-IkiWiki::rcs_commit_staged("Added the 4th page", "moo", "Joe User");
+IkiWiki::rcs_commit_staged(
+ message => "Added the 4th page",
+ session => $session,
+);
@changes = IkiWiki::rcs_recentchanges(4);
ok(mkdir($config{srcdir}."/newdir"));
IkiWiki::rcs_rename("test4.mdwn", "newdir/test5.mdwn");
-IkiWiki::rcs_commit_staged("Added the 5th page", "moo", "Joe User");
+IkiWiki::rcs_commit_staged(
+ message => "Added the 5th page",
+ session => $session,
+);
@changes = IkiWiki::rcs_recentchanges(4);
is($changes[0]{pages}[0]{"page"}, "newdir/test5");
IkiWiki::rcs_remove("newdir/test5.mdwn");
-IkiWiki::rcs_commit_staged("Remove the 5th page", "moo", "Joe User");
+IkiWiki::rcs_commit_staged(
+ message => "Remove the 5th page",
+ session => $session,
+);
system "rm -rf $dir";
my $test1 = readfile("t/test1.mdwn");
writefile('test1.mdwn', $config{srcdir}, $test1);
IkiWiki::rcs_add("test1.mdwn");
-IkiWiki::rcs_commit("test1.mdwn", "Added the first page", "moo");
+IkiWiki::rcs_commit(
+ files => "test1.mdwn",
+ message => "Added the first page",
+ token => "moo"
+);
my @changes;
@changes = IkiWiki::rcs_recentchanges(3);
my $test1 = readfile("t/test1.mdwn");
writefile('test1.mdwn', $config{srcdir}, $test1);
IkiWiki::rcs_add("test1.mdwn");
-IkiWiki::rcs_commit("test1.mdwn", "Added the first page", "moo");
+IkiWiki::rcs_commit(
+ file => "test1.mdwn",
+ message => "Added the first page",
+ token => "moo",
+);
@changes = IkiWiki::rcs_recentchanges(3);
writefile('test3.mdwn', $config{srcdir}, $test1);
IkiWiki::rcs_add("test3.mdwn");
IkiWiki::rcs_rename("test3.mdwn", "test4.mdwn");
-IkiWiki::rcs_commit_staged("Added the 4th page", "moo", "Joe User");
+IkiWiki::rcs_commit_staged(message => "Added the 4th page");
@changes = IkiWiki::rcs_recentchanges(4);
ok(mkdir($config{srcdir}."/newdir"));
IkiWiki::rcs_rename("test4.mdwn", "newdir/test5.mdwn");
-IkiWiki::rcs_commit_staged("Added the 5th page", "moo", "Joe User");
+IkiWiki::rcs_commit_staged(message => "Added the 5th page");
@changes = IkiWiki::rcs_recentchanges(4);
is($changes[0]{pages}[0]{"page"}, "newdir/test5");
IkiWiki::rcs_remove("newdir/test5.mdwn");
-IkiWiki::rcs_commit_staged("Remove the 5th page", "moo", "Joe User");
+IkiWiki::rcs_commit_staged(message => "Remove the 5th page");
system "rm -rf $dir";
IkiWiki::loadplugins();
IkiWiki::checkconfig();
+use CGI::Session;
+my $session=CGI::Session->new;
+$session->param("name", "Joe User");
+
system "hg init $config{srcdir}";
# Web commit
my $test1 = readfile("t/test1.mdwn");
writefile('test1.mdwn', $config{srcdir}, $test1);
IkiWiki::rcs_add("test1.mdwn");
-IkiWiki::rcs_commit("test1.mdwn", "Added the first page", "moo", "Joe User");
+IkiWiki::rcs_commit(
+ file => "test1.mdwn",
+ message => "Added the first page",
+ token => "moo",
+ session => $session,
+);
my @changes;
@changes = IkiWiki::rcs_recentchanges(3);
my $test1 = readfile("t/test1.mdwn");
writefile('test1.mdwn', $config{srcdir}, $test1);
IkiWiki::rcs_add("test1.mdwn");
-IkiWiki::rcs_commit("test1.mdwn", "Added the first page", "moo");
+IkiWiki::rcs_commit(
+ file => "test1.mdwn",
+ message => "Added the first page",
+ token => "moo",
+);
my @changes;
@changes = IkiWiki::rcs_recentchanges(3);
<input type="hidden" name="do" value="commentmoderation" />
<input type="hidden" name="sid" value="<TMPL_VAR SID>" />
<input type="submit" value="Submit" />
-<input type="checkbox" name="rejectalldefer" value="1" />
+<input id="rejectalldefer" type="checkbox" name="rejectalldefer" value="1" />
<label for="rejectalldefer">Reject all comments marked <em>Defer</em></label>
<br />
<TMPL_LOOP COMMENTS>
<div>
<TMPL_VAR VIEW>
</div>
-<input type="radio" value="Defer" name="<TMPL_VAR ID>" checked="checked" />
-<label for="Defer">Defer</label>
-<input type="radio" value="Accept" name="<TMPL_VAR ID>" />
-<label for="Accept">Accept</label>
-<input type="radio" value="Reject" name="<TMPL_VAR ID>" />
-<label for="Reject">Reject</label>
+<input id="defer_<TMPL_VAR ID>" type="radio" value="Defer" name="<TMPL_VAR ID>" checked="checked" />
+<label for="defer_<TMPL_VAR ID>">Defer</label>
+<input id="dccept_<TMPL_VAR ID>" type="radio" value="Accept" name="<TMPL_VAR ID>" />
+<label for="dccept_<TMPL_VAR ID>">Accept</label>
+<input id="reject_<TMPL_VAR ID>" type="radio" value="Reject" name="<TMPL_VAR ID>" />
+<label for="reject_<TMPL_VAR ID>">Reject</label>
</div>
<br />
</TMPL_LOOP>
<input type="submit" value="Submit" />
-<input type="checkbox" name="rejectalldefer" value="1" />
-<label for="rejectalldefer">Reject all comments marked <em>Defer</em></label>
+<input id="rejectalldefer2" type="checkbox" name="rejectalldefer" value="1" />
+<label for="rejectalldefer2">Reject all comments marked <em>Defer</em></label>
</form>
<TMPL_ELSE>
<p>
<div class="editcomment">
<TMPL_VAR MESSAGE>
+<br />
<TMPL_VAR FORM-START>
<TMPL_VAR FIELD-DO>
<TMPL_VAR FIELD-SID>
<TMPL_VAR FIELD-PAGE>
-<ol class="form">
<TMPL_UNLESS NAME=USERNAME>
<TMPL_IF NAME=ALLOWAUTHOR>
-<li>
<label for="author" class="block">Name:</label>
<TMPL_VAR NAME=FIELD-AUTHOR> (optional, or <a href="<TMPL_VAR SIGNINURL>">signin</a>)
-</li>
-<li>
+<br/>
<label for="url" class="block">Website:</label>
<TMPL_VAR NAME=FIELD-URL> (optional)
-</li>
+<br />
<TMPL_ELSE>
-<li>
(You might want to <a href="<TMPL_VAR SIGNINURL>">Signin</a> first?)
-</li>
+<br />
</TMPL_IF>
</TMPL_UNLESS>
-<li>
<label for="subject" class="block">Subject:</label>
<TMPL_VAR FIELD-SUBJECT><br />
-</li>
-<li>
<label for="editcontent" class="block">Comment:</label>
<TMPL_VAR FIELD-EDITCONTENT><br />
-</li>
-</ol>
<TMPL_VAR FORM-SUBMIT> <TMPL_VAR FIELD-TYPE> <TMPL_VAR HELPONFORMATTINGLINK><br />
<TMPL_VAR NAME="FORM-END">
<TMPL_VAR WMD_PREVIEW>
<TMPL_VAR JAVASCRIPT>
<TMPL_VAR MESSAGE>
+<br />
<TMPL_VAR FORM-START>
<TMPL_VAR FIELD-DO>
<TMPL_VAR FIELD-SID>
<TMPL_VAR FIELD-FROM>
<TMPL_VAR FIELD-RCSINFO>
<TMPL_VAR FIELD-NEWFILE>
-<ol class="form">
<TMPL_IF NAME="PAGE_SELECT">
-<li>
<label for="page" class="inline">Page location:</label><TMPL_VAR FIELD-PAGE>
<label for="type" class="inline">Page type:</label><TMPL_VAR FIELD-TYPE>
-</li>
<TMPL_ELSE>
<TMPL_VAR FIELD-PAGE>
<TMPL_VAR FIELD-TYPE>
</TMPL_IF>
-<li>
<div class="editcontentdiv">
<TMPL_VAR FIELD-EDITCONTENT><br />
</div>
-</li>
<TMPL_IF NAME="CAN_COMMIT">
-<li>
-<label for="comments" class="block">Optional comment about this change:</label>
-<TMPL_VAR FIELD-COMMENTS><br />
-</li>
+<label for="editmessage" class="block">Optional comment about this change:</label>
+<TMPL_VAR FIELD-EDITMESSAGE><br />
</TMPL_IF>
-</ol>
<TMPL_VAR FORM-SUBMIT>
<TMPL_VAR HELPONFORMATTINGLINK>
<TMPL_IF NAME="FIELD-ATTACHMENT">
--- /dev/null
+/* actiontabs theme for ikiwiki
+ *
+ * by svend
+ */
+
+a {
+ text-decoration: none;
+ color: #005a9c;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+
+hr {
+ border-style: none;
+ background-color: #999;
+ height: 1px;
+}
+
+code, pre {
+ background: #eee;
+}
+
+pre {
+ padding: .5em;
+}
+
+body {
+ margin: 0;
+ padding: 0;
+ font-family: sans-serif;
+ color: black;
+ background: white;
+}
+
+.pageheader {
+ margin: 0;
+ padding: 1em 2em;
+ position: relative;
+ overflow: hidden;
+ background: #eee;
+ border-color: #999;
+ border-style: none none solid none;
+ border-width: 1px;
+}
+
+.pageheader .header {
+ float: left;
+ font-size: 120%;
+}
+
+.header {
+ font-weight: normal;
+}
+
+.title {
+ display: block;
+ margin-top: .2em;
+ font: 140% sans-serif;
+}
+
+#searchform {
+ position: absolute;
+ top: 0.5em;
+ right: 2em;
+}
+
+.pageheader .actions {
+ position: absolute;
+ bottom: 5px;
+ right: 2em;
+ width: 100%;
+ text-align: right;
+ padding: 0;
+}
+
+#content, #comments, #footer {
+ margin: 1em 2em;
+}
+
+#pageinfo {
+ border-color: #999;
+}
+
+.inlinepage {
+ margin: .4em 0;
+ padding: .4em 0;
+ border-style: none;
+ border-top: 1px solid #aaa;
+}
+
+.inlineheader {
+ font-size: 120%;
+}
+
+h1 { font: 120% sans-serif }
+h2 { font: bold 100% sans-serif }
+h3 { font: italic 100% sans-serif }
+h4, h5, h6 { font: small-caps 100% sans-serif }
+
+/* Smaller headings for inline pages */
+.inlinepage h1 { font-size: 110% }
+.inlinepage h2 { font-size: 100% }
+.inlinepage h3 { font-size: 100% }
+
+.pageheader .actions ul {
+ border-style: none
+}
+
+.actions ul {
+ padding: 0;
+ border-style: none;
+}
+
+.actions ul li a {
+ text-decoration: none;
+}
+
+.pageheader .actions ul li {
+ margin: 0;
+ padding: .1em .5em 0 .5em;
+ background: white;
+ border-color: #999;
+ border-style: solid solid none solid;
+ border-width: 1px;
+}
+
+div.recentchanges {
+ border-style: none;
+}
+
+.pagecloud {
+ width: auto;
+}
+
+.sidebar {
+ border-bottom: 0;
+ border-right: 0;
+ border-top: 0;
+ margin-top: 0.5em;
+ padding: 0 0 0 2ex;
+ border-color: #999;
+}
--- /dev/null
+/* bzed theme for ikiwiki
+ *
+ * Copyright (C) 2010 Bernd Zeimetz
+ * Licensed under same license as ikiwiki: GPL v2 or later
+ *
+ * Parts of this file are based on the awesome YUI,
+ * these parts will stay under the BSD license,
+ * but you're free to apply the GPLv2 to them, of course.
+ */
+
+
+
+/* -------------------------------------------------------------------------------------------------
+Based on reset-fonts-grids.css from yui.
+Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.5.1
+*/
+body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,legend,p,blockquote,th,td{margin:0;padding:0;}
+table{border-collapse:collapse;border-spacing:0;}
+img{border:0;}
+address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
+li{list-style:none;}
+caption,th{text-align:left;}
+h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
+q:before,q:after{content:'';}
+abbr,acronym {border:0;font-variant:normal;}
+sup {vertical-align:text-top;}
+sub {vertical-align:text-bottom;}
+input,textarea,select{font-family:inherit;font-size: 13px/1.23;font-weight:normal;}
+input,textarea,select{*font-size:100%;}
+legend{color:#000;}
+/* body {font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;} */
+body {font:13px/1.231 "Lucida Grande",Verdana,Lucida,Helvetica,Arial,sans-serif;*font-size:small;*font:x-small;}
+table {font-size:inherit;font:100%;}
+pre,code,kbd,samp,tt{font-family:monospace;}
+
+
+body{text-align:left;}
+.inlinefooter{clear:both;}
+
+/* #doc,#doc2,#doc3,#doc4,.yui-t1,.yui-t2,.yui-t3,.yui-t4,.yui-t5,.yui-t6,.yui-t7{margin:auto;text-align:left;width:57.69em;*width:56.25em;min-width:750px;} */
+.page {margin:auto;text-align:left;width:57.69em;*width:56.25em;min-width:750px;}
+
+/* #doc3{margin:auto 10px;width:auto;} */
+.page {margin:auto 10px;width:auto;}
+
+#pagebody, .sidebar{position:relative;}
+#pagebody, .sidebar{_position:static;}
+#pagebody {position:static;}
+.sidebar {float:right;width:16.5em;*width:16em;}
+#pagebody {margin-right:19em;*margin-right:18.5em;}
+/* #content {float:none;width:auto;} */
+#pagebody:after, .sidebar:after, .page:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
+.page f{zoom:1;}
+
+/* ------------------------------------------------------------------------------------------------
+ * Taken from base.css, part of YUI's CSS Foundation
+ * Copyright (c) 2008, Yahoo! Inc. All rights reserved.
+ * Code licensed under the BSD License:
+ * http://developer.yahoo.net/yui/license.txt
+ * version: 2.5.1
+*/
+h1 {
+ /*18px via YUI Fonts CSS foundation*/
+ font-size:138.5%;
+}
+h2 {
+ /*16px via YUI Fonts CSS foundation*/
+ font-size:123.1%;
+}
+h3 {
+ /*14px via YUI Fonts CSS foundation*/
+ font-size:108%;
+}
+h1,h2,h3 {
+ /* top & bottom margin based on font size */
+ margin:1em 0;
+}
+h1,h2,h3,h4,h5,h6,strong {
+ /*bringing boldness back to headers and the strong element*/
+ font-weight:bold;
+}
+abbr,acronym {
+ /*indicating to users that more info is available */
+ border-bottom:1px dotted #000;
+ cursor:help;
+}
+em {
+ /*bringing italics back to the em element*/
+ font-style:italic;
+}
+blockquote,ul,ol,dl {
+ /*giving blockquotes and lists room to breath*/
+ margin:1em;
+}
+ol,ul,dl {
+ /*bringing lists on to the page with breathing room */
+ margin-left:2em;
+}
+ol li {
+ /*giving OL's LIs generated numbers*/
+ list-style: decimal outside;
+}
+ul li {
+ /*giving UL's LIs generated disc markers*/
+ list-style: disc outside;
+}
+dl dd {
+ /*giving UL's LIs generated numbers*/
+ margin-left:1em;
+}
+th,td {
+ /*borders and padding to make the table readable*/
+ border:1px solid #000;
+ padding:.5em;
+}
+th {
+ /*distinguishing table headers from data cells*/
+ font-weight:bold;
+ text-align:center;
+}
+caption {
+ /*coordinated margin to match cell's padding*/
+ margin-bottom:.5em;
+ /*centered so it doesn't blend in to other content*/
+ text-align:center;
+}
+p,fieldset,table,pre {
+ /*so things don't run into each other*/
+ margin-bottom:1em;
+}
+
+#searchbox {
+ width:21.5em;*width:21em;
+}
+
+
+
+/* ------------------------------------------------------------------------------------------------
+ * All CSS below is
+ * Copyright (C) 2010 Bernd Zeimetz
+ * Licensed under same license as ikiwiki: GPL v2 or later */
+
+.page, .pageheader, .sidebar, #content, #comments, .inlinepage, .recentchanges, .pageheader .actions ul, #pagebody {
+ border: none;
+}
+
+html, body {
+ color:#000;
+ /* background-image: url('body_background.png');
+ background-repeat: repeat; */
+ background-color: #8da1b8;
+}
+
+body {
+ padding-left: 5%;
+ padding-right: 5%;
+ padding-top: 1em;
+ padding-bottom: 1em;
+}
+
+.page {
+ background: #fff;
+ border: outset #ccc;
+ padding-left: 1em;
+ padding-right: 1em;
+ padding-top: 1em;
+}
+
+.pageheader {
+ background-image: url('header_background.png');
+ background-repeat: repeat-x;
+ height: 100px;
+ padding-left: 1em;
+ padding-right: 1em;
+ padding-bottom: 1em;
+ padding-top: 1em;
+}
+
+.pageheader .header {
+ text-align: top;
+ clear: both;
+}
+
+.pageheader .header form {
+ padding: 0em 0em 0em 0em;
+ float: right;
+ margin-top: 0.5em;
+}
+
+.pageheader .header .title, .pageheader .header .parentlinks,
+ .inlinepage .inlineheader,
+ h1, h2, h3, h4, h5, h6 {
+ margin-top: 1em;
+ font-weight: bold;
+}
+
+.pageheader .header .title, .pageheader .header .parentlinks, .pageheader .actions ul li, .pageheader .header span {
+ padding: 0.25em 0.25em 0.25em 0.25em;
+ background-image: url('background_darkness.png');
+ background-repeat: repeat;
+ color: white;
+}
+
+.pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a {
+ color: white;
+ text-decoration: none;
+}
+
+.pageheader .actions {
+ text-align: right;
+ vertical-align: bottom;
+ clear: both;
+}
+
+#pagebody {
+ padding-right: 1em;
+ padding-bottom: 2em;
+ border-right: ridge #eee;
+ clear: none;
+}
+
+#content a, #comments a, .sidebar a {
+ color: #315485;
+ text-decoration: none;
+ font-weight: bold;
+}
+
+.sidebar h2 {
+ border-bottom: ridge #eee;
+ padding-right: 0;
+}
+
+.sidebar .menu {
+ margin-left: 1em;
+}
+
+
+.inlinepage, .recentchanges, div.recentchanges {
+ clear: none !important;
+ margin-bottom: 2em;
+}
+
+.inlinefooter {
+ border-top: 1px dotted #315485;
+}
+
+.inlinefooter .pagedate, .inlinefooter .tags {
+ display: inline;
+ clear: none;
+ margin-right: 2em;
+}
+
+.calendar .month-calendar th, .calendar .month-calendar td {
+ padding: 0.22em;
+}
+
+@media print {
+ .sidebar, .page .pageheader .header .parentlinks {
+ content:".";
+ display:block;
+ height:0;
+ visibility:hidden;
+ }
+ .page {
+ padding: 1em 1em 1em 1em;
+ }
+ .pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a {
+ color #315485;
+ }
+ #content, #comments, #pagebody {
+ margin-right: 0;
+ *margin-right: 0;
+ border-right: none;
+ }
+
+}
+