dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Move up devunt's name to Developers"
[lhc/web/wiklou.git]
/
includes
/
site
/
SiteExporter.php
diff --git
a/includes/site/SiteExporter.php
b/includes/site/SiteExporter.php
index
62f6ca3
..
01b838e
100644
(file)
--- a/
includes/site/SiteExporter.php
+++ b/
includes/site/SiteExporter.php
@@
-52,18
+52,18
@@
class SiteExporter {
* @param Site[]|SiteList $sites
*/
public function exportSites( $sites ) {
* @param Site[]|SiteList $sites
*/
public function exportSites( $sites ) {
- $attributes =
array(
+ $attributes =
[
'version' => '1.0',
'xmlns' => 'http://www.mediawiki.org/xml/sitelist-1.0/',
'version' => '1.0',
'xmlns' => 'http://www.mediawiki.org/xml/sitelist-1.0/',
-
)
;
+
]
;
- fwrite( $this->sink, X
ML
::openElement( 'sites', $attributes ) . "\n" );
+ fwrite( $this->sink, X
ml
::openElement( 'sites', $attributes ) . "\n" );
foreach ( $sites as $site ) {
$this->exportSite( $site );
}
foreach ( $sites as $site ) {
$this->exportSite( $site );
}
- fwrite( $this->sink, X
ML
::closeElement( 'sites' ) . "\n" );
+ fwrite( $this->sink, X
ml
::closeElement( 'sites' ) . "\n" );
fflush( $this->sink );
}
fflush( $this->sink );
}
@@
-74,41
+74,41
@@
class SiteExporter {
*/
private function exportSite( Site $site ) {
if ( $site->getType() !== Site::TYPE_UNKNOWN ) {
*/
private function exportSite( Site $site ) {
if ( $site->getType() !== Site::TYPE_UNKNOWN ) {
- $siteAttr =
array( 'type' => $site->getType() )
;
+ $siteAttr =
[ 'type' => $site->getType() ]
;
} else {
$siteAttr = null;
}
} else {
$siteAttr = null;
}
- fwrite( $this->sink, "\t" . X
ML
::openElement( 'site', $siteAttr ) . "\n" );
+ fwrite( $this->sink, "\t" . X
ml
::openElement( 'site', $siteAttr ) . "\n" );
- fwrite( $this->sink, "\t\t" . X
ML
::element( 'globalid', null, $site->getGlobalId() ) . "\n" );
+ fwrite( $this->sink, "\t\t" . X
ml
::element( 'globalid', null, $site->getGlobalId() ) . "\n" );
if ( $site->getGroup() !== Site::GROUP_NONE ) {
if ( $site->getGroup() !== Site::GROUP_NONE ) {
- fwrite( $this->sink, "\t\t" . X
ML
::element( 'group', null, $site->getGroup() ) . "\n" );
+ fwrite( $this->sink, "\t\t" . X
ml
::element( 'group', null, $site->getGroup() ) . "\n" );
}
if ( $site->getSource() !== Site::SOURCE_LOCAL ) {
}
if ( $site->getSource() !== Site::SOURCE_LOCAL ) {
- fwrite( $this->sink, "\t\t" . X
ML
::element( 'source', null, $site->getSource() ) . "\n" );
+ fwrite( $this->sink, "\t\t" . X
ml
::element( 'source', null, $site->getSource() ) . "\n" );
}
if ( $site->shouldForward() ) {
}
if ( $site->shouldForward() ) {
- fwrite( $this->sink, "\t\t" . X
ML
::element( 'forward', null, '' ) . "\n" );
+ fwrite( $this->sink, "\t\t" . X
ml
::element( 'forward', null, '' ) . "\n" );
}
foreach ( $site->getAllPaths() as $type => $path ) {
}
foreach ( $site->getAllPaths() as $type => $path ) {
- fwrite( $this->sink, "\t\t" . X
ML::element( 'path', array( 'type' => $type )
, $path ) . "\n" );
+ fwrite( $this->sink, "\t\t" . X
ml::element( 'path', [ 'type' => $type ]
, $path ) . "\n" );
}
foreach ( $site->getLocalIds() as $type => $ids ) {
foreach ( $ids as $id ) {
}
foreach ( $site->getLocalIds() as $type => $ids ) {
foreach ( $ids as $id ) {
- fwrite( $this->sink, "\t\t" . X
ML::element( 'localid', array( 'type' => $type )
, $id ) . "\n" );
+ fwrite( $this->sink, "\t\t" . X
ml::element( 'localid', [ 'type' => $type ]
, $id ) . "\n" );
}
}
}
}
- //@todo: export <data>
- //@todo: export <config>
+ //
@todo: export <data>
+ //
@todo: export <config>
- fwrite( $this->sink, "\t" . X
ML
::closeElement( 'site' ) . "\n" );
+ fwrite( $this->sink, "\t" . X
ml
::closeElement( 'site' ) . "\n" );
}
}
}
}