r75447 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75446‎ | r75447 | r75448 >
Date:17:27, 26 October 2010
Author:mgrabovsky
Status:deferred
Tags:
Comment:
Fixed 'unsupported operand types' error
Modified paths:
  • /branches/REL1_15/extensions/HideNamespace/HideNamespace.php (modified) (history)

Diff [purge]

Index: branches/REL1_15/extensions/HideNamespace/HideNamespace.php
@@ -26,7 +26,7 @@
2727 'name' => 'HideNamespace',
2828 'description' => 'Hides namespace in the header and title when a page is in specified namespace or when the <code><nowiki>{{#hidens:}}</nowiki></code> parser function is called.',
2929 'descriptionmsg' => 'hidens-desc',
30 - 'version' => '1.4.1',
 30+ 'version' => '1.4.1a',
3131 'author' => 'Matěj Grabovský',
3232 'url' => 'http://www.mediawiki.org/wiki/Extension:HideNamespace',
3333 );
@@ -45,10 +45,9 @@
4646 function wfHideNamespaceSetupLanguageGetMagic( &$mw, $lang ) {
4747 require_once( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'HideNamespace.i18n.magic.php' );
4848
49 - if( $lang == 'en' || !isset( $magicWords[$lang] ) )
50 - $mw += $magicWords['en'];
51 - else
52 - $mw += array_merge( $magicWords['en'], $magicWords[$lang] );
 49+ $mw = array_merge( $mw, $magicWords['en'] );
 50+ if( $lang !== 'en' && isset( $magicWords[$lang] ) )
 51+ $mw = array_merge( $mw, $magicWords[$lang] );
5352
5453 return true;
5554 }

Status & tagging log