- postrename($session, $src, $dest, $q->param("attachment"));
+ # scan for broken links to $src
+ my @brokenlinks;
+ foreach my $page (keys %links) {
+ foreach my $link (@{$links{$page}}) {
+ my $bestlink=bestlink($page, $link);
+ if ($bestlink eq $src) {
+ push @brokenlinks, $page;
+ }
+ }
+ }
+
+ # Generate a rename summary, that will be shown at the top
+ # of the edit template.
+ my $template=template("renamesummary.tmpl");
+ $template->param(src => $src);
+ $template->param(dest => $dest);
+ $template->param(linklist => [
+ map {
+ {
+ page => htmllink($dest, $dest, $_,
+ noimageinline => 1)
+ }
+ } @brokenlinks
+ ]);
+ $renamesummary=$template->output;
+
+ postrename($session, $dest, $q->param("attachment"));