r102584 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102583‎ | r102584 | r102585 >
Date:22:11, 9 November 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
bugfix (useless space); support profiling
Modified paths:
  • /trunk/extensions/Lingo/LingoBasicBackend.php (modified) (history)
  • /trunk/extensions/Lingo/LingoElement.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Lingo/LingoBasicBackend.php
@@ -56,6 +56,8 @@
5757 */
5858 public function next() {
5959
 60+ wfProfileIn( __METHOD__ );
 61+
6062 $ret = null;
6163 static $term = null;
6264 static $definition = null;
@@ -90,6 +92,8 @@
9193
9294 }
9395
 96+ wfProfileOut( __METHOD__ );
 97+
9498 return $ret;
9599 }
96100
Index: trunk/extensions/Lingo/LingoElement.php
@@ -48,6 +48,8 @@
4949
5050 global $wgexLingoDisplayOnce;
5151
 52+ wfProfileIn( __METHOD__ );
 53+
5254 // return textnode if
5355 if ( $wgexLingoDisplayOnce && $this->mHasBeenDisplayed ) {
5456 return $doc->createTextNode($this->mTerm);
@@ -75,7 +77,7 @@
7678
7779 foreach ( $this->mDefinitions as $definition ) {
7880 wfSuppressWarnings();
79 - $element = $doc->createElement( 'span', htmlentities( $definition[self::ELEMENT_DEFINITION], ENT_COMPAT, 'UTF-8' ) . ' ' );
 81+ $element = $doc->createElement( 'span', htmlentities( $definition[self::ELEMENT_DEFINITION], ENT_COMPAT, 'UTF-8' ) );
8082 wfRestoreWarnings();
8183 if ( $definition[self::ELEMENT_LINK] ) {
8284 $linkedTitle = Title::newFromText( $definition[self::ELEMENT_LINK] );
@@ -97,6 +99,8 @@
98100 $this->mHasBeenDisplayed = true;
99101 }
100102
 103+ wfProfileOut( __METHOD__ );
 104+
101105 return $this->mFullDefinition->cloneNode( true );
102106 }
103107

Status & tagging log