r51064 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51063‎ | r51064 | r51065 >
Date:14:26, 27 May 2009
Author:yaron
Status:deferred
Tags:
Comment:
Fixed bug in handling default forms for namespaces
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_LinkUtils.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_LinkUtils.inc
@@ -303,9 +303,13 @@
304304 // if it's in the main (blank) namespace, check for the
305305 // file named with the word for "Main" in this language
306306 wfLoadExtensionMessages('SemanticForms');
307 - $namespace = wfMsgForContent('sf_blank_namespace');
 307+ $namespace_label = wfMsgForContent('sf_blank_namespace');
 308+ } else {
 309+ global $wgContLang;
 310+ $namespace_labels = $wgContLang->getNamespaces();
 311+ $namespace_label = $namespace_labels[$namespace];
308312 }
309 - $default_forms = self::getDefaultForms($namespace, NS_PROJECT);
 313+ $default_forms = self::getDefaultForms($namespace_label, NS_PROJECT);
310314 return $default_forms;
311315 }
312316

Status & tagging log