Index: trunk/extensions/SemanticMediaWiki/specials/Export/SMW_SpecialOWLExport.php |
— | — | @@ -27,18 +27,25 @@ |
28 | 28 | |
29 | 29 | // see if we can find something to export: |
30 | 30 | $page = is_null( $page ) ? $wgRequest->getVal( 'page' ) : rawurldecode( $page ); |
| 31 | + $pages = false; |
31 | 32 | |
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; |
34 | 35 | |
35 | | - if ( $pageblob !== '' ) { |
36 | | - $pages = explode( "\n", $pageblob ); |
| 36 | + if ( $page !== '' ) { |
| 37 | + $pages = array( $page ); |
37 | 38 | } |
38 | | - } else { |
39 | | - $pages = array( $page ); |
40 | 39 | } |
41 | 40 | |
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 ) { |
43 | 50 | $this->exportPages( $pages ); |
44 | 51 | return; |
45 | 52 | } else { |
— | — | @@ -58,7 +65,8 @@ |
59 | 66 | } |
60 | 67 | } |
61 | 68 | } |
62 | | - // nothing exported yet; show user interface: |
| 69 | + |
| 70 | + // Nothing exported yet; show user interface: |
63 | 71 | $this->showForm(); |
64 | 72 | } |
65 | 73 | |