r65480 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65479‎ | r65480 | r65481 >
Date:19:57, 23 April 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Fixed broken returnto functionallity
Modified paths:
  • /trunk/extensions/Storyboard/specials/Story/Story_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Storyboard/specials/Story/Story_body.php
@@ -29,19 +29,17 @@
3030 if ( $wgUser->isAllowed( 'storyreview' ) ) {
3131 // If the user is allowed to actually modify the story, save it.
3232 $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 - }
3933 } else {
4034 // If the user is not allowed to modify stories, show an error.
4135 $wgOut->addWikiMsg( 'storyboard-cantedit' );
4236 }
4337 }
4438
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' ) ) {
4644 $this->queryAndShowStory( $title );
4745 } else {
4846 $wgOut->setPageTitle( wfMsg( 'storyboard-viewstories' ) );

Status & tagging log