r73131 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73130‎ | r73131 | r73132 >
Date:17:28, 16 September 2010
Author:maxsem
Status:deferred
Tags:
Comment:
Follow-up r70719: prettified gadget export link
Modified paths:
  • /trunk/extensions/Gadgets/SpecialGadgets.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Gadgets/SpecialGadgets.php
@@ -31,11 +31,9 @@
3232 * @param $par Parameters passed to the page
3333 */
3434 function execute( $par ) {
35 - global $wgRequest;
36 -
37 - $export = $wgRequest->getVal( 'export' );
38 - if ( $export ) {
39 - $this->showExportForm( $export );
 35+ $parts = explode( '/', $par );
 36+ if ( count( $parts ) == 2 && $parts[0] == 'export' ) {
 37+ $this->showExportForm( $parts[1] );
4038 } else {
4139 $this->showMainForm();
4240 }
@@ -94,9 +92,7 @@
9593 if ( $editInterfaceAllowed ) {
9694 $links[] = $skin->link( $t, wfMsgHTML( 'edit' ), array(), array( 'action' => 'edit' ) );
9795 }
98 - $links[] = $skin->link( $this->getTitle(), wfMsgHtml( 'gadgets-export' ),
99 - array(), array( 'export' => $gname )
100 - );
 96+ $links[] = $skin->link( $this->getTitle( "export/$gname" ), wfMsgHtml( 'gadgets-export' ) );
10197
10298 $ttext = wfMsgExt( "gadget-$gname", $msgOpt );
10399

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70719Gadgets: added export feature for easier reusemaxsem18:22, 8 August 2010

Status & tagging log