Index: trunk/extensions/Storyboard/specials/Story/Story_body.php |
— | — | @@ -29,19 +29,17 @@ |
30 | 30 | if ( $wgUser->isAllowed( 'storyreview' ) ) { |
31 | 31 | // If the user is allowed to actually modify the story, save it. |
32 | 32 | $this->saveStory(); |
33 | | - |
34 | | - // Redirect the user when the redirect parameter is set. |
35 | | - if ( $wgRequest->getVal( 'returnto' ) ) { |
36 | | - $titleObj = Title::newFromText( $wgRequest->getVal( 'returnto' ) ); |
37 | | - $wgOut->redirect( $titleObj->getFullURL() ); |
38 | | - } |
39 | 33 | } else { |
40 | 34 | // If the user is not allowed to modify stories, show an error. |
41 | 35 | $wgOut->addWikiMsg( 'storyboard-cantedit' ); |
42 | 36 | } |
43 | 37 | } |
44 | 38 | |
45 | | - if ( trim( $title ) != '' || $wgRequest->getIntOrNull( 'id' ) ) { |
| 39 | + // Redirect the user when the redirect parameter is set. |
| 40 | + if ( $wgRequest->getVal( 'returnto' ) ) { |
| 41 | + $titleObj = Title::newFromText( $wgRequest->getVal( 'returnto' ) ); |
| 42 | + $wgOut->redirect( $titleObj->getFullURL() ); |
| 43 | + } else if ( trim( $title ) != '' || $wgRequest->getIntOrNull( 'id' ) ) { |
46 | 44 | $this->queryAndShowStory( $title ); |
47 | 45 | } else { |
48 | 46 | $wgOut->setPageTitle( wfMsg( 'storyboard-viewstories' ) ); |