From d502f4b5deb9b03d7524a2e88bb1f3179f1878d7 Mon Sep 17 00:00:00 2001 From: Martin Kamerbeek Date: Mon, 22 Dec 2008 18:44:11 +0000 Subject: [PATCH] -Fixed a bug where the clicking apply button when func=add would return the edit screen of the parent asset rather than that of the newly added asset. --- docs/changelog/7.x.x.txt | 3 +++ lib/WebGUI/Asset.pm | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 16ce54cdb..bee9da92c 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,6 +3,9 @@ - fixed #9285: modifing template prevents edit of syncontent - fixed #8886: Search button in Asset manager - fixed #9154: WebGUI Shop - Checkout Caching Problem + - fixed a bug where clicking the apply button when func=add would return the + edit screen of the parent asset rather than that of the new asset. (Martin + Kamerbeek / Oqapi). 7.6.7 - fixed #9263: Thingy possibleValues processing, and List type autodetection. diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 23ffbb6d7..f3c4b6961 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -2628,7 +2628,12 @@ sub www_editSave { # Handle "saveAndReturn" button if ( $self->session->form->process( "saveAndReturn" ) ne "" ) { - return $self->www_edit; + if ($isNewAsset) { + return $object->www_edit; + } + else { + return $self->www_edit; + } } # Handle "proceed" form parameter