Item12032: make publish rest script obey normal rules for redirectto
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Make publish rest script obey normal rules for redirectto. See discussion at
Support/Question1146.
--
DeanSpicer - 05 Aug 2012
Supporting this in existing
PublishPlugin releases is a fairly trivial thing to do:
Index: lib/Foswiki/Plugins/PublishPlugin.pm
===================================================================
--- lib/Foswiki/Plugins/PublishPlugin.pm (revision 15237)
+++ lib/Foswiki/Plugins/PublishPlugin.pm (working copy)
@@ -75,6 +75,11 @@
$publisher->publish( split( /[,\s]+/, $1 ) );
}
$publisher->finish();
+
+ my $r2 = $query->param('redirectto');
+ if ($r2) {
+ $session->redirect($r2);
+ }
}
I have made some changes to the core REST support in 1.2 to consistently support
redirectto
for REST requests. However it will not be supported until 1.2 is released.
--
CrawfordCurrie - 21 Aug 2012
redirectto
is a core function now, and has been for a long time. Nothing else required.
--
Main.CrawfordCurrie - 01 Mar 2017 - 15:49