* during the export in a single query.
*/
$catpages = $this->getPagesFromCategory( $t );
- if ( $catpages ) $page .= "\n" . implode( "\n", $catpages );
+ if ( $catpages ) {
+ $page .= "\n" . implode( "\n", $catpages );
+ }
}
}
}
* Same implementation as above, so same @todo
*/
$nspages = $this->getPagesFromNamespace( $nsindex );
- if ( $nspages ) $page .= "\n" . implode( "\n", $nspages );
+ if ( $nspages ) {
+ $page .= "\n" . implode( "\n", $nspages );
+ }
}
}
else if( $wgRequest->wasPosted() && $par == '' ) {
}
}
- if( $page != '' ) $this->doExport = true;
+ if( $page != '' ) {
+ $this->doExport = true;
+ }
} else {
// Default to current-only for GET requests.
$page = $wgRequest->getText( 'pages', $par );
$history = WikiExporter::CURRENT;
}
- if( $page != '' ) $this->doExport = true;
+ if( $page != '' ) {
+ $this->doExport = true;
+ }
}
if( !$wgExportAllowHistory ) {
}
$list_authors = $wgRequest->getCheck( 'listauthors' );
- if ( !$this->curonly || !$wgExportAllowListContributors ) $list_authors = false ;
+ if ( !$this->curonly || !$wgExportAllowListContributors ) {
+ $list_authors = false ;
+ }
if ( $this->doExport ) {
$wgOut->disable();
}*/
#Bug 8824: Only export pages the user can read
$title = Title::newFromText( $page );
- if( is_null( $title ) ) continue; #TODO: perhaps output an <error> tag or something.
- if( !$title->userCanRead() ) continue; #TODO: perhaps output an <error> tag or something.
+ if( is_null( $title ) ) {
+ continue; #TODO: perhaps output an <error> tag or something.
+ }
+ if( !$title->userCanRead() ) {
+ continue; #TODO: perhaps output an <error> tag or something.
+ }
$exporter->pageByTitle( $title );
}
/** Expand a list of pages to include pages linked to from that page. */
private function getPageLinks( $inputPages, $pageSet, $depth ) {
- for(; $depth > 0; --$depth ) {
+ for( ; $depth > 0; --$depth ) {
$pageSet = $this->getLinks(
$inputPages, $pageSet, 'pagelinks',
array( 'pl_namespace AS namespace', 'pl_title AS title' ),