r89093 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89092‎ | r89093 | r89094 >
Date:12:15, 29 May 2011
Author:reedy
Status:ok
Tags:
Comment:
Remove 1 unused global

Reformat some code
Modified paths:
  • /trunk/extensions/BackAndForth/BackAndForth.class.php (modified) (history)
  • /trunk/extensions/OpenSearchXml/OpenSearchXml.php (modified) (history)

Diff [purge]

Index: trunk/extensions/BackAndForth/BackAndForth.class.php
@@ -13,7 +13,7 @@
1414 * @return bool
1515 */
1616 public static function viewHook( $article ) {
17 - global $wgOut, $wgUser;
 17+ global $wgOut;
1818 $title = $article->getTitle();
1919 if ( MWNamespace::isContent( $title->getNamespace() ) ) {
2020 $wgOut->addHTML( self::buildLinks( $title ) );
Index: trunk/extensions/OpenSearchXml/OpenSearchXml.php
@@ -54,6 +54,8 @@
5555 function efOpenSearchXmlTemplate() {
5656 global $wgServer, $wgScriptPath;
5757 $ns = implode( '|', SearchEngine::defaultNamespaces() );
58 - if( !$ns ) $ns = '0';
59 - return $wgServer . $wgScriptPath . '/api.php?action=opensearch&format=xml&search={searchTerms}&namespace='.$ns;
 58+ if( !$ns ) {
 59+ $ns = '0';
 60+ }
 61+ return $wgServer . $wgScriptPath . '/api.php?action=opensearch&format=xml&search={searchTerms}&namespace=' . $ns;
6062 }

Status & tagging log