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 "Add .pipeline/ with dev image variant"
[lhc/web/wiklou.git]
/
includes
/
title
/
NamespaceInfo.php
diff --git
a/includes/title/NamespaceInfo.php
b/includes/title/NamespaceInfo.php
index
105eeaa
..
7234be2
100644
(file)
--- a/
includes/title/NamespaceInfo.php
+++ b/
includes/title/NamespaceInfo.php
@@
-62,6
+62,7
@@
class NamespaceInfo {
public static $canonicalNames = [
NS_MEDIA => 'Media',
NS_SPECIAL => 'Special',
public static $canonicalNames = [
NS_MEDIA => 'Media',
NS_SPECIAL => 'Special',
+ NS_MAIN => '',
NS_TALK => 'Talk',
NS_USER => 'User',
NS_USER_TALK => 'User_talk',
NS_TALK => 'Talk',
NS_USER => 'User',
NS_USER_TALK => 'User_talk',
@@
-341,7
+342,7
@@
class NamespaceInfo {
* Returns array of all defined namespaces with their canonical
* (English) names.
*
* Returns array of all defined namespaces with their canonical
* (English) names.
*
- * @return
array
+ * @return
string[]
*/
public function getCanonicalNamespaces() {
if ( $this->canonicalNamespaces === null ) {
*/
public function getCanonicalNamespaces() {
if ( $this->canonicalNamespaces === null ) {
@@
-396,6
+397,7
@@
class NamespaceInfo {
*/
public function getValidNamespaces() {
if ( is_null( $this->validNamespaces ) ) {
*/
public function getValidNamespaces() {
if ( is_null( $this->validNamespaces ) ) {
+ $this->validNamespaces = [];
foreach ( array_keys( $this->getCanonicalNamespaces() ) as $ns ) {
if ( $ns >= 0 ) {
$this->validNamespaces[] = $ns;
foreach ( array_keys( $this->getCanonicalNamespaces() ) as $ns ) {
if ( $ns >= 0 ) {
$this->validNamespaces[] = $ns;