Yaron Koren has uploaded a new change for review. https://gerrit.wikimedia.org/r/211746
Change subject: Fix for display of Special:CargoExport with incomplete (or null) query string ...................................................................... Fix for display of Special:CargoExport with incomplete (or null) query string Change-Id: Ic6c9692cfed16223bfa661f2fffaab89e02b023f --- M specials/CargoExport.php 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo refs/changes/46/211746/1 diff --git a/specials/CargoExport.php b/specials/CargoExport.php index b72e66e..aeba680 100644 --- a/specials/CargoExport.php +++ b/specials/CargoExport.php @@ -21,7 +21,16 @@ $this->getOutput()->setArticleBodyOnly( true ); $req = $this->getRequest(); - $tableArray = $req->getArray( 'tables' ); + + // If no value has been set for 'tables', or 'table', just + // display a blank screen. + if ( $req->getCheck( 'tables' ) ) { + $tableArray = $req->getArray( 'tables' ); + } elseif ( $req->getCheck( 'table' ) ) { + $tableArray = $req->getArray( 'table' ); + } else { + return; + } $fieldsArray = $req->getArray( 'fields' ); $whereArray = $req->getArray( 'where' ); $joinOnArray = $req->getArray( 'join_on' ); @@ -65,6 +74,8 @@ $this->displayExcelData( $sqlQueries, $filename ); } elseif ( $format == 'json' ) { $this->displayJSONData( $sqlQueries ); + } else { + print "Error: format must be set."; } } -- To view, visit https://gerrit.wikimedia.org/r/211746 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic6c9692cfed16223bfa661f2fffaab89e02b023f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Cargo Gerrit-Branch: master Gerrit-Owner: Yaron Koren <yaro...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits