https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103342
Revision: 103342
Author: foxtrott
Date: 2011-11-16 17:28:54 +0000 (Wed, 16 Nov 2011)
Log Message:
-----------
bugfix (incorrect relation of terms to definitions)
Modified Paths:
--------------
trunk/extensions/Lingo/LingoBasicBackend.php
Modified: trunk/extensions/Lingo/LingoBasicBackend.php
===================================================================
--- trunk/extensions/Lingo/LingoBasicBackend.php 2011-11-16 16:59:35 UTC
(rev 103341)
+++ trunk/extensions/Lingo/LingoBasicBackend.php 2011-11-16 17:28:54 UTC
(rev 103342)
@@ -59,7 +59,7 @@
wfProfileIn( __METHOD__ );
$ret = null;
- static $term = null;
+ $term = null;
static $definition = null;
// find next valid line (yes, the assignation is intended)
@@ -72,10 +72,10 @@
$chunks = explode( ':', $entry[1], 2 );
// found a new term?
- if ( $chunks[0] ) {
+ if ( count( $chunks ) >= 1 && strlen( $chunks[0] ) >= 1
) {
$term = trim( substr( $chunks[0], 1 ) );
}
-
+
// found a new definition?
if ( count ( $chunks ) == 2 ) {
$definition = trim( $chunks[1] );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs