r97333 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97332‎ | r97333 | r97334 >
Date:21:00, 16 September 2011
Author:reedy
Status:ok
Tags:
Comment:
REL1_18 MFT r97296, r97298
Modified paths:
  • /branches/REL1_18/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /branches/REL1_18/phase3/includes/DefaultSettings.php (modified) (history)
  • /branches/REL1_18/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18
@@ -619,6 +619,7 @@
620620 * Kashmiri (ks) split into Kashmiri (Perso-Arabic) (ks-arab) and Kashmiri
621621 (Devanagari) (ks-deva). Defaults to ks-arab.
622622 * (bug 30817) Restored linktrail for kk (Kazakh)
 623+* (bug 27398) Add $wgExtraGenderNamespaces for configured gendered namespaces
623624
624625 === Other changes in 1.18 ===
625626 * Removed legacy wgAjaxWatch javascript global object, no longer in use.
Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18
___________________________________________________________________
Modified: svn:mergeinfo
626627 Merged /trunk/phase3/RELEASE-NOTES-1.18:r97296,97298
Index: branches/REL1_18/phase3/includes/DefaultSettings.php
@@ -2597,6 +2597,14 @@
25982598 $wgExtraNamespaces = array();
25992599
26002600 /**
 2601+ * Same as above, but for namespaces with gender distinction.
 2602+ * Note: the default form for the namespace should also be set
 2603+ * using $wgExtraNamespaces for the same index.
 2604+ * @since 1.18
 2605+ */
 2606+$wgExtraGenderNamespaces = array();
 2607+
 2608+/**
26012609 * Namespace aliases
26022610 * These are alternate names for the primary localised namespace names, which
26032611 * are defined by $wgExtraNamespaces and the language file. If a page is
Index: branches/REL1_18/phase3/languages/Language.php
@@ -372,7 +372,9 @@
373373 * @since 1.18
374374 */
375375 function getGenderNsText( $index, $gender ) {
376 - $ns = self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
 376+ global $wgExtraGenderNamespaces;
 377+
 378+ $ns = $wgExtraGenderNamespaces + self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
377379 return isset( $ns[$index][$gender] ) ? $ns[$index][$gender] : $this->getNsText( $index );
378380 }
379381
@@ -383,7 +385,8 @@
384386 * @since 1.18
385387 */
386388 function needsGenderDistinction() {
387 - $aliases = self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
 389+ global $wgExtraGenderNamespaces;
 390+ $aliases = $wgExtraGenderNamespaces + self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
388391 return count( $aliases ) > 0;
389392 }
390393
@@ -419,7 +422,8 @@
420423 }
421424 }
422425
423 - $genders = self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
 426+ global $wgExtraGenderNamespaces;
 427+ $genders = $wgExtraGenderNamespaces + self::$dataCache->getItem( $this->mCode, 'namespaceGenderAliases' );
424428 foreach ( $genders as $index => $forms ) {
425429 foreach ( $forms as $alias ) {
426430 $aliases[$alias] = $index;

Sign-offs

UserFlagDate
Leinadtested21:19, 16 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97296* (bug 27398) Add $wgExtraGenderNamespaces for configured gendered namespacesnikerabbit16:11, 16 September 2011
r97298Amend documentation for r97296nikerabbit16:59, 16 September 2011

Status & tagging log