[FIXED HUDSON-4160] fixed redirect after deleting view

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20452 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
huybrechts committed 2009-08-05 05:59:04 +00:00
1 parent ae28f88a1f
commit 01daea2fbf
5 files changed
+36 -4

No files matched your search

@@ -38,6 +38,9 @@ import org.kohsuke.stapler.StaplerResponse;
/**
* A view that delegates to another.
*
* TODO: this does not respond to renaming or deleting the proxied view.
*
* @author Tom Huybrechts
*
*/
+2 -2
View File
@@ -504,13 +504,13 @@ public abstract class View extends AbstractModelObject implements AccessControll
/**
* Deletes this view.
*/
public synchronized HttpResponse doDoDelete() throws IOException, ServletException {
public synchronized void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
requirePOST();
checkPermission(DELETE);
owner.deleteView(this);
return new HttpRedirect("/" + owner.getUrl());
rsp.sendRedirect2(req.getContextPath()+"/" + owner.getUrl());
}