Item12032: make publish rest script obey normal rules for redirectto

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: PublishPlugin
Branches:
Reported By: DeanSpicer
Waiting For:
Last Change By: CrawfordCurrie
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
 

ItemTemplate edit

Summary make publish rest script obey normal rules for redirectto
ReportedBy DeanSpicer
Codebase 1.0.9
SVN Range
AppliesTo Extension
Component PublishPlugin
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
Topic revision: r3 - 01 Mar 2017, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy