Index: trunk/extensions/Configure/Configure.page.php |
— | — | @@ -311,18 +311,19 @@ |
312 | 312 | |
313 | 313 | if ( $version = $wgRequest->getVal( 'version' ) ) { |
314 | 314 | if ( $version == 'default' || $wgConf->versionExists( $version ) ) { |
315 | | - $conf = $wgConf->getOldSettings( $version ); |
| 315 | + if ( $version == 'default' ) { ## Hacky special case. |
| 316 | + $this->conf = $wgConf->getDefaultsForWiki( $this->mWiki ); |
| 317 | + } else { |
| 318 | + $conf = $wgConf->getOldSettings( $version ); |
316 | 319 | |
317 | | - if ( $version == 'default' ) { ## Hacky special case. |
318 | | - $conf[$this->mWiki] = $conf['default']; |
| 320 | + if ( !isset( $conf[$this->mWiki] ) ) { |
| 321 | + $wgOut->wrapWikiMsg( '<div class="errorbox">$1</div>', |
| 322 | + array( 'configure-old-not-available', $version ) ); |
| 323 | + return false; |
| 324 | + } |
| 325 | + $this->conf = $conf[$this->mWiki]; |
319 | 326 | } |
320 | 327 | |
321 | | - if ( !isset( $conf[$this->mWiki] ) ) { |
322 | | - $wgOut->wrapWikiMsg( '<div class="errorbox">$1</div>', |
323 | | - array( 'configure-old-not-available', $version ) ); |
324 | | - return false; |
325 | | - } |
326 | | - $this->conf = $conf[$this->mWiki]; |
327 | 328 | $current = null; |
328 | 329 | foreach ( $this->conf as $name => $value ) { |
329 | 330 | if ( $this->canBeMerged( $name, $value ) ) { |
— | — | @@ -405,8 +406,8 @@ |
406 | 407 | $text .= "</li>\n</ul>\n"; |
407 | 408 | } |
408 | 409 | $link = SpecialPage::getTitleFor( 'ViewConfig' ); |
409 | | - $text .= Xml::tags( 'p', null, $skin->makeKnownLinkObj( $link, wfMsgHtml( 'configure-view-all-versions' ) ) ); |
410 | | - $text .= Xml::tags( 'p', null, $skin->makeKnownLinkObj( $link, wfMsgHtml( 'configure-view-default' ), 'version=default' ) ); |
| 410 | + $text .= Xml::tags( 'p', null, $skin->link( $link, wfMsgHtml( 'configure-view-all-versions' ), array(), array(), array( 'known' ) ) ); |
| 411 | + $text .= Xml::tags( 'p', null, $skin->link( $link, wfMsgHtml( 'configure-view-default' ), array(), array( 'version' => 'default' ), array( 'known' ) ) ); |
411 | 412 | |
412 | 413 | $text .= '</fieldset>'; |
413 | 414 | return $text; |
— | — | @@ -566,7 +567,7 @@ |
567 | 568 | } else { |
568 | 569 | $val = $wgRequest->getCheck( $id ); |
569 | 570 | } |
570 | | - if ($val) |
| 571 | + if ( $val ) |
571 | 572 | $settings[$name][$group][$right] = true; |
572 | 573 | } else if ( $wgRequest->getCheck( $id ) ) { |
573 | 574 | $settings[$name][$group][] = $right; |