r73945 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73944‎ | r73945 | r73946 >
Date:12:43, 29 September 2010
Author:jojo
Status:ok
Tags:
Comment:
make page to redirect to configurable
Modified paths:
  • /trunk/extensions/Collection/Collection.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.php
@@ -182,13 +182,15 @@
183183 $collection = $json->decode( $collection );
184184 $collection['enabled'] = true;
185185 $_SESSION['wsCollection'] = $collection;
186 - $title = SpecialPage::getTitleFor( 'Book' );
187 - $redirecturl = $title->getFullURL( $urlaction );
188186 $r = new AjaxResponse();
189187 if ( $redirect ) {
 188+ $title = Title::newFromText( $redirect );
 189+ $redirecturl = $title->getFullURL();
190190 $r->setResponseCode( 302 );
191191 header( 'Location: ' . $redirecturl );
192192 } else {
 193+ $title = SpecialPage::getTitleFor( 'Book' );
 194+ $redirecturl = $title->getFullURL();
193195 $r->setContentType( 'application/json' );
194196 $r->addText( $json->encode( array( 'redirect_url' => $redirecturl ) ) );
195197 }

Status & tagging log