r11982 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11981‎ | r11982 | r11983 >
Date:21:05, 5 December 2005
Author:eloquence
Status:old
Tags:
Comment:
Fix tab highlighting bug caused by too logical implementation of
Namespace::getTalk() ;-)

BTW, if anyone wants to work on this branch a bit, help with cleaning up
unused $wgContLang globals would be appreciated.
Modified paths:
  • /branches/wikidata/phase3/includes/Namespace.php (modified) (history)
  • /branches/wikidata/phase3/includes/SkinTemplate.php (modified) (history)
  • /branches/wikidata/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: branches/wikidata/phase3/includes/Title.php
@@ -1184,7 +1184,7 @@
11851185 * @access private
11861186 */
11871187 /* private */ function prefix( $name ) {
1188 - global $wgContLang, $wgNamespaces;
 1188+ global $wgNamespaces;
11891189
11901190 $p = '';
11911191 if ( '' != $this->mInterwiki ) {
Index: branches/wikidata/phase3/includes/Namespace.php
@@ -205,9 +205,14 @@
206206 $this->isSearchedByDefault=(bool)$search;
207207 }
208208
209 - /* todo: support multiple talk pages */
 209+ /* TODO: support multiple discussion namespaces,
 210+ so that things like a Review: namespace
 211+ become possible in parallel to normal talk
 212+ pages. */
210213 function getTalk() {
211214 global $wgNamespaces;
 215+ /* This behavior is expected by Title.php! */
 216+ if($this->isTalk()) return $this->getIndex();
212217 foreach($wgNamespaces as $ns) {
213218 if($ns->hasParent() && $ns->parentIndex==$this->index) {
214219 return $ns->index;
Index: branches/wikidata/phase3/includes/SkinTemplate.php
@@ -883,6 +883,7 @@
884884 * @private
885885 */
886886 function getNameSpaceKey () {
 887+ wfDebug("NS key is ".$this->mTitle->getNamespace()."\n");
887888 switch ($this->mTitle->getNamespace()) {
888889 case NS_MAIN:
889890 case NS_TALK:

Status & tagging log