r51290 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r51289‎ | r51290 | r51291 >
Date:16:02, 1 June 2009
Author:sergeychernyshev
Status:deferred
Tags:
Comment:
Using $wgServerName as default namespace so enable_semantics can be called without parameters.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php
@@ -85,11 +85,16 @@
8686 * This function also sets up all autoloading, such that all SMW classes are available
8787 * as early as possible. Moreover, jobs and special pages are registered.
8888 */
89 -function enableSemantics($namespace = '', $complete = false) {
 89+function enableSemantics($namespace = null, $complete = false) {
9090 global $smwgIP, $smwgNamespace, $wgExtensionFunctions, $wgAutoloadClasses, $wgSpecialPages, $wgSpecialPageGroups, $wgHooks, $wgExtensionMessagesFiles, $wgJobClasses, $wgExtensionAliasesFiles;
9191 // The dot tells that the domain is not complete. It will be completed
9292 // in the Export since we do not want to create a title object here when
9393 // it is not needed in many cases.
 94+ if ($namespace === null)
 95+ {
 96+ $namespace = $wgServerName;
 97+ }
 98+
9499 if ( !$complete && ($smwgNamespace !== '') ) {
95100 $smwgNamespace = '.' . $namespace;
96101 } else {

Status & tagging log