IkiWiki::check_canedit($src, $q, $session);
if ($attachment) {
if (IkiWiki::Plugin::attachment->can("check_canattach")) {
IkiWiki::check_canedit($src, $q, $session);
if ($attachment) {
if (IkiWiki::Plugin::attachment->can("check_canattach")) {
- # Must be a legal filename, and not absolute.
- if (IkiWiki::file_pruned($destfile, $config{srcdir}) ||
- $destfile=~/^\//) {
+ # Must be a legal filename.
+ if (IkiWiki::file_pruned($destfile)) {
if ($attachment) {
# Note that $srcfile is used here, not $destfile,
# because it wants the current file, to check it.
if ($attachment) {
# Note that $srcfile is used here, not $destfile,
# because it wants the current file, to check it.
fields => [qw{do page new_name attachment}],
);
$f->field(name => "do", type => "hidden", value => "rename", force => 1);
fields => [qw{do page new_name attachment}],
);
$f->field(name => "do", type => "hidden", value => "rename", force => 1);
$f->field(name => "page", type => "hidden", value => $page, force => 1);
$f->field(name => "new_name", value => pagetitle($page, 1), size => 60);
if (!$q->param("attachment")) {
$f->field(name => "page", type => "hidden", value => $page, force => 1);
$f->field(name => "new_name", value => pagetitle($page, 1), size => 60);
if (!$q->param("attachment")) {
- 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};
$file,
sprintf(gettext("update for rename of %s to %s"), $rename->{srcfile}, $rename->{destfile}),
$token,
$file,
sprintf(gettext("update for rename of %s to %s"), $rename->{srcfile}, $rename->{destfile}),
$token,