Index: trunk/extensions/Collection/Collection.body.php |
— | — | @@ -76,7 +76,6 @@ |
77 | 77 | CollectionSession::enable(); |
78 | 78 | $wgOut->redirect( $title->getFullURL() ); |
79 | 79 | return; |
80 | | - |
81 | 80 | case 'stop_book_creator': |
82 | 81 | $title = Title::newFromText( $wgRequest->getVal( 'referer', '' ) ); |
83 | 82 | if ( is_null( $title ) || $title->equals( $wgTitle ) ) { |
— | — | @@ -317,6 +316,8 @@ |
318 | 317 | function renderBookCreatorPage( $referer ) { |
319 | 318 | global $wgOut; |
320 | 319 | global $wgScriptPath; |
| 320 | + global $wgTitle; |
| 321 | + global $wgUser; |
321 | 322 | |
322 | 323 | $this->setHeaders(); |
323 | 324 | $wgOut->setPageTitle( wfMsg( 'coll-book_creator' ) ); |
— | — | @@ -359,6 +360,12 @@ |
360 | 361 | EOS |
361 | 362 | ; |
362 | 363 | |
| 364 | + $title = Title::newFromText( $referer ); |
| 365 | + if ( is_null( $title ) || $title->equals( $wgTitle ) ) { |
| 366 | + $title = Title::newMainPage(); |
| 367 | + } |
| 368 | + $sk = $wgUser->getSkin(); |
| 369 | + |
363 | 370 | $wgOut->addHTML( |
364 | 371 | Xml::tags( 'div', |
365 | 372 | array( |
— | — | @@ -386,18 +393,15 @@ |
387 | 394 | array( |
388 | 395 | 'class' => 'collection-button cancel', |
389 | 396 | ), |
390 | | - Xml::element( 'a', |
| 397 | + $sk->link( |
| 398 | + $title, |
| 399 | + wfMsgHtml( 'coll-cancel' ), |
391 | 400 | array( |
392 | | - 'href' => SkinTemplate::makeSpecialUrl( |
393 | | - 'Book', |
394 | | - array( |
395 | | - 'bookcmd' => 'stop_book_creator', |
396 | | - 'referer' => $referer, |
397 | | - ) |
398 | | - ), |
399 | | - // TODO: title |
| 401 | + 'rel' => 'nofollow', |
| 402 | + // TOOD: title |
400 | 403 | ), |
401 | | - wfMsg( 'coll-cancel' ) |
| 404 | + array(), |
| 405 | + array( 'known', 'noclasses' ) |
402 | 406 | ) |
403 | 407 | ) |
404 | 408 | . Xml::element( 'div', |