Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -23,7 +23,7 @@ |
24 | 24 | * Override SpecialPage::execute() |
25 | 25 | */ |
26 | 26 | function execute( $param ) { |
27 | | - global $wgOut, $wgRequest, $wgRecordAdminUseNamespaces, $wgLang; |
| 27 | + global $wgVersion, $wgOut, $wgRequest, $wgRecordAdminUseNamespaces, $wgLang; |
28 | 28 | $this->setHeaders(); |
29 | 29 | $type = $wgRequest->getText( 'wpType' ) or $type = $param; |
30 | 30 | $record = $wgRequest->getText( 'wpRecord' ); |
— | — | @@ -35,11 +35,18 @@ |
36 | 36 | if ( $wpTitle && !ereg( "^$type:.+$", $wpTitle ) ) $wpTitle = "$type:$wpTitle"; |
37 | 37 | } |
38 | 38 | |
39 | | - $wgOut->addHTML( $wgLang->pipeList( array( |
40 | | - "<div class='center'><a href='" . $title->getLocalURL() . "/$type'>" . wfMsg( 'recordadmin-newsearch', $type ) . "</a>", |
41 | | - "<a href='" . $title->getLocalURL() . "'>" . wfMsg( 'recordadmin-newrecord' ) . "</a></div><br>\n" |
42 | | - ) ) ); |
43 | | - |
| 39 | + if (version_compare($wgVersion, '1.14.0') >= 0) { |
| 40 | + $wgOut->addHTML( $wgLang->pipeList( array( |
| 41 | + "<div class='center'><a href='" . $title->getLocalURL() . "/$type'>" . wfMsg( 'recordadmin-newsearch', $type ) . "</a>", |
| 42 | + "<a href='" . $title->getLocalURL() . "'>" . wfMsg( 'recordadmin-newrecord' ) . "</a></div><br>\n" |
| 43 | + ) ) ); |
| 44 | + } |
| 45 | + else { |
| 46 | + $wgOut->addHTML( "<div class='center'><a href='" . $title->getLocalURL() . "/$type'>" . wfMsg( 'recordadmin-newsearch', $type ) . "</a> | " |
| 47 | + . "<a href='" . $title->getLocalURL() . "'>" . wfMsg( 'recordadmin-newrecord' ) . "</a></div><br>\n" |
| 48 | + ); |
| 49 | + } |
| 50 | + |
44 | 51 | # Get posted form values if any |
45 | 52 | $posted = array(); |
46 | 53 | foreach ( $_POST as $k => $v ) if ( ereg( '^ra_(.+)$', $k, $m ) ) $posted[$m[1]] = $v; |