r103342 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103341‎ | r103342 | r103343 >
Date:17:28, 16 November 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
bugfix (incorrect relation of terms to definitions)
Modified paths:
  • /trunk/extensions/Lingo/LingoBasicBackend.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Lingo/LingoBasicBackend.php
@@ -59,7 +59,7 @@
6060 wfProfileIn( __METHOD__ );
6161
6262 $ret = null;
63 - static $term = null;
 63+ $term = null;
6464 static $definition = null;
6565
6666 // find next valid line (yes, the assignation is intended)
@@ -72,10 +72,10 @@
7373 $chunks = explode( ':', $entry[1], 2 );
7474
7575 // found a new term?
76 - if ( $chunks[0] ) {
 76+ if ( count( $chunks ) >= 1 && strlen( $chunks[0] ) >= 1 ) {
7777 $term = trim( substr( $chunks[0], 1 ) );
7878 }
79 -
 79+
8080 // found a new definition?
8181 if ( count ( $chunks ) == 2 ) {
8282 $definition = trim( $chunks[1] );

Status & tagging log