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 "mediawiki.widgets: Remove use of bind() for lexical 'this' binding"
[lhc/web/wiklou.git]
/
maintenance
/
generateSitemap.php
diff --git
a/maintenance/generateSitemap.php
b/maintenance/generateSitemap.php
index
256824e
..
f5cc6f6
100644
(file)
--- a/
maintenance/generateSitemap.php
+++ b/
maintenance/generateSitemap.php
@@
-89,21
+89,21
@@
class GenerateSitemap extends Maintenance {
*
* @var array
*/
*
* @var array
*/
- public $limit =
array()
;
+ public $limit =
[]
;
/**
* Key => value entries of namespaces and their priorities
*
* @var array
*/
/**
* Key => value entries of namespaces and their priorities
*
* @var array
*/
- public $priorities =
array()
;
+ public $priorities =
[]
;
/**
* A one-dimensional array of namespaces in the wiki
*
* @var array
*/
/**
* A one-dimensional array of namespaces in the wiki
*
* @var array
*/
- public $namespaces =
array()
;
+ public $namespaces =
[]
;
/**
* When this sitemap batch was generated
/**
* When this sitemap batch was generated
@@
-258,13
+258,13
@@
class GenerateSitemap extends Maintenance {
}
$res = $this->dbr->select( 'page',
}
$res = $this->dbr->select( 'page',
-
array( 'page_namespace' )
,
-
array()
,
+
[ 'page_namespace' ]
,
+
[]
,
__METHOD__,
__METHOD__,
- array(
+ [
'GROUP BY' => 'page_namespace',
'ORDER BY' => 'page_namespace',
'GROUP BY' => 'page_namespace',
'ORDER BY' => 'page_namespace',
- )
+ ]
);
foreach ( $res as $row ) {
);
foreach ( $res as $row ) {
@@
-306,13
+306,13
@@
class GenerateSitemap extends Maintenance {
*/
function getPageRes( $namespace ) {
return $this->dbr->select( 'page',
*/
function getPageRes( $namespace ) {
return $this->dbr->select( 'page',
- array(
+ [
'page_namespace',
'page_title',
'page_touched',
'page_is_redirect'
'page_namespace',
'page_title',
'page_touched',
'page_is_redirect'
-
)
,
-
array( 'page_namespace' => $namespace )
,
+
]
,
+
[ 'page_namespace' => $namespace ]
,
__METHOD__
);
}
__METHOD__
);
}
@@
-548,7
+548,7
@@
class GenerateSitemap extends Maintenance {
// bug 17961: make a title with the longest possible URL in this namespace
$title = Title::makeTitle( $namespace, str_repeat( "\xf0\xa8\xae\x81", 63 ) . "\xe5\x96\x83" );
// bug 17961: make a title with the longest possible URL in this namespace
$title = Title::makeTitle( $namespace, str_repeat( "\xf0\xa8\xae\x81", 63 ) . "\xe5\x96\x83" );
- $this->limit =
array(
+ $this->limit =
[
strlen( $this->openFile() ),
strlen( $this->fileEntry(
$title->getCanonicalURL(),
strlen( $this->openFile() ),
strlen( $this->fileEntry(
$title->getCanonicalURL(),
@@
-556,7
+556,7
@@
class GenerateSitemap extends Maintenance {
$this->priority( $namespace )
) ),
strlen( $this->closeFile() )
$this->priority( $namespace )
) ),
strlen( $this->closeFile() )
-
)
;
+
]
;
}
}
}
}