r113776 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113775‎ | r113776 | r113777 >
Date:22:41, 13 March 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
follow up to r113725, fix regression
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/Export/SMW_SpecialOWLExport.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/Export/SMW_SpecialOWLExport.php
@@ -27,18 +27,25 @@
2828
2929 // see if we can find something to export:
3030 $page = is_null( $page ) ? $wgRequest->getVal( 'page' ) : rawurldecode( $page );
 31+ $pages = false;
3132
32 - if ( $page === '' ) { // Try to get POST list; some settings are only available via POST.
33 - $pageblob = $wgRequest->getText( 'pages' );
 33+ if ( !is_null( $page ) || $wgRequest->getCheck( 'page' ) ) {
 34+ $page = is_null( $page ) ? $wgRequest->getCheck( 'text' ) : $page;
3435
35 - if ( $pageblob !== '' ) {
36 - $pages = explode( "\n", $pageblob );
 36+ if ( $page !== '' ) {
 37+ $pages = array( $page );
3738 }
38 - } else {
39 - $pages = array( $page );
4039 }
4140
42 - if ( isset( $pages ) ) {
 41+ if ( $pages === false && $wgRequest->getCheck( 'pages' ) ) {
 42+ $pageBlob = $wgRequest->getText( 'pages' );
 43+
 44+ if ( $pageBlob !== '' ) {
 45+ $pages = explode( "\n", $wgRequest->getText( 'pages' ) );
 46+ }
 47+ }
 48+
 49+ if ( $pages !== false ) {
4350 $this->exportPages( $pages );
4451 return;
4552 } else {
@@ -58,7 +65,8 @@
5966 }
6067 }
6168 }
62 - // nothing exported yet; show user interface:
 69+
 70+ // Nothing exported yet; show user interface:
6371 $this->showForm();
6472 }
6573

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113725fix bug 35180jeroendedauw15:39, 13 March 2012

Status & tagging log