r70114 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70113‎ | r70114 | r70115 >
Date:21:32, 28 July 2010
Author:nikerabbit
Status:ok
Tags:
Comment:
Skip if there no translation and fix author parsing
Modified paths:
  • /trunk/extensions/Translate/ffs/PhpVariables.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/ffs/PhpVariables.php
@@ -169,8 +169,9 @@
170170
171171 # Authors first
172172 $matches = array();
173 - preg_match_all( '/^ * @author\s*(.*)\s*$/m', $data, $matches );
 173+ preg_match_all( '/^ \* @author\s+(.+)$/m', $data, $matches );
174174 $authors = $matches[1];
 175+ var_dump( $matches );
175176
176177 # Then messages
177178 $matches = array();
@@ -211,6 +212,7 @@
212213 $key = stripcslashes( $key );
213214
214215 $value = $item->translation();
 216+ if ( $value === null ) continue;
215217 $value = str_replace( TRANSLATE_FUZZY, '', $value );
216218 $value = addcslashes( $value, "'" );
217219

Status & tagging log